/* styles/responsive/mobile.css */

/* Mobile sidebar overlay style */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: calc(-1 * var(--sidebar-width));
        z-index: 1001;
        height: 100vh;
        transition: left 0.3s ease;
        overflow-y: auto;
        background-color: var(--theme-section-bg);
    }

    .sidebar.collapsed {
        width: var(--sidebar-width);
        left: 0;
    }

    .sidebar.collapsed .sidebar-logo {
        opacity: 1;
        width: auto;
        max-width: 120px;
    }

    .sidebar-header {
        justify-content: center;
        padding: 0.7rem 0.5rem;
    }

    .sidebar-logo {
        margin: 21px 0 5px 20px;
    }

    .sidebar.collapsed .sidebar-title {
        opacity: 1;
        width: auto;
    }

    .sidebar.collapsed .link-text {
        opacity: 1;
        width: auto;
    }

    .sidebar.collapsed .sidebar-footer {
        opacity: 1;
        height: auto;
        padding: 1rem;
    }

    .sidebar.collapsed .nav-link i {
        padding-right: 0.5rem;
    }

    .main-content {
        padding-left: 0;
    }

    .app-footer {
        margin-left: 0;
        z-index: 1000;
        position: relative;
    }

    .content-header {
        padding-left: 4.5rem;
        position: relative;
    }

    #sidebar-toggle-btn {
        display: block !important;
        position: absolute;
        left: 0.8rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1002;
        font-size: 1.5rem;
        color: var(--theme-text);
        padding: 0.5rem;
        display: block !important;
    }

    .content-header h1 {
        font-size: 1.3rem;
    }

    .status-bar {
        display: none;
    }

    .section-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .section-header-bar h2 {
        font-size: 1.3rem;
    }

    .report-item {
        grid-template-columns: 1fr auto;
        grid-template-areas: 
            "title  actions"
            "date   actions"
            "status actions";
        gap: 0.2rem 1rem;
    }

    .report-item-date,
    .report-item-status {
        text-align: left;
    }

    .report-item-actions {
        justify-content: flex-end;
    }

    .report-item-actions button {
        padding: 0.4rem 0.9rem;
    }

    .report-item-actions .download-report-btn {
        padding: 0.4rem 0.7rem;
    }

    #indicator-selection,
    #strategy-selection {
        grid-template-columns: 1fr;
    }

    .indicator-category-group {
        grid-template-columns: 1fr;
    }

    .mp-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .mp-metric-card {
        padding: 12px 8px;
    }

    .mp-asset-tags {
        gap: 6px;
    }

    .mp-asset-tag {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .mp-compact-subscription-controls {
        padding: 12px;
    }

    .mp-interval-selector {
        gap: 8px;
    }

    .mp-interval-option {
        padding: 6px 12px;
    }

    .reporting-time-info {
        font-size: 0.75rem;
    }

    .mp-status-message {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        padding: 10px 15px;
        font-size: 0.9rem;
    }

    .mp-report-actions {
        opacity: 1;
        top: 8px;
        right: 8px;
    }

    .delete-report-btn {
        padding: 5px 7px;
        font-size: 0.9rem;
    }

    .delete-all-reports-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .countdown-status-indicator {
        font-size: 0.7rem;
        margin-right: 0.5rem;
    }

    .schedule-warning {
        padding: 1.5rem;
        margin: 0.5rem 0;
    }

    .llm-credit-header {
        flex-direction: column;
        align-items: stretch;
    }

    .llm-websearch-container {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
    }

    .websearch-toggle-wrapper {
        order: 1;
    }

    .websearch-badge {
        order: 2;
    }

    .sidebar.collapsed .pwa-install-button .install-text {
        opacity: 1;
        width: auto;
        overflow: visible;
    }

    .sidebar.collapsed .pwa-install-button {
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .analysis-path-selection {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .path-card {
        padding: 1.2rem;
    }

    .detail-item {
        flex-direction: column;
        gap: 2px;
        align-items: flex-start;
    }

    .detail-value {
        text-align: left;
    }

    .card-expandable {
        padding: 8px;
        margin-top: 8px;
    }

    .tier-badge {
        font-size: 0.7rem;
        padding: 2px 6px;
    }

    .card-title {
        padding-right: 4px;
    }

    .report-card {
        padding: 12px;
        margin-bottom: 8px;
    }

    .card-header {
        margin-bottom: 6px;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .update-banner {
        padding: 14px 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .update-banner .banner-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .update-banner .banner-text {
        align-items: center;
    }

    .update-banner .banner-actions {
        width: 100%;
        justify-content: center;
    }

    .update-banner .update-button {
        flex: 1;
        max-width: 200px;
        padding: 12px 24px;
    }

    .path-card-header {
        gap: 0.6rem;
    }

    .path-card-header h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .update-banner {
        padding: 12px;
    }

    .update-banner .banner-title {
        font-size: 0.9rem;
    }

    .update-banner .banner-subtitle {
        font-size: 0.8rem;
    }

    .update-banner .update-button {
        font-size: 0.85rem;
        padding: 10px 16px;
    }

    .update-banner .dismiss-button {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .wallet-actions {
        gap: 16px;
        padding: 0 4px;
    }

    .wallet-button {
        padding: 14px 16px;
        font-size: 1rem;
        min-height: 52px;
    }

    .wallet-button i {
        font-size: 1rem;
    }


    .refresh-btn {
        right: -5px;
    }

    .panel-content {
        padding: 28px 20px;
        padding-top: 52px;
    }

    .qr-code-container {
        width: clamp(180px, 60vw, 200px);
        height: clamp(180px, 60vw, 200px);
        padding: 12px;
    }

    .withdraw-form-modern {
        max-width: 100%;
    }

    .address-input-wrapper input {
        padding: 14px 44px 14px 14px;
    }

    .tx-item {
        padding: 12px 16px;
    }

    .wallet-button {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .modern-wallet-container {
        padding: 24px 16px;
        margin: 0 8px;
    }

    .balance-section {
        padding: 20px;
    }

    .wallet-actions {
        gap: 16px;
    }

    .qr-scanner-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .wallet-button {
        border: 2px solid;
    }

    .tx-item {
        border: 1px solid var(--theme-border);
    }

    .balance-section {
        border: 2px solid rgba(74, 144, 226, 0.3);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .modern-wallet-container {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    .wallet-actions,
    .refresh-btn {
        display: none !important;
    }
}