﻿/* Settings Page Specific Styles */

/* Auto-detect system/Shopify theme preference */
@media (prefers-color-scheme: dark) {
    :root:not(.theme-override) {
        color-scheme: dark;
    }
    
    body:not(.theme-override) {
        --page-bg: radial-gradient(1200px 600px at 20% -10%, #1f2937 0%, rgba(31,41,55,0) 60%),
                   radial-gradient(1000px 500px at 100% 0%, #0ea5e9 0%, rgba(14,165,233,0) 40%),
                   linear-gradient(180deg, #0b1020 0%, #0b1220 100%);
        --text: #0f172a;
        --muted: #475569;
        --heading: #0f172a;
        --card-bg: rgba(255,255,255,0.95);
        --card-border: rgba(148,163,184,0.3);
        --shadow-1: 0 6px 24px rgba(2,6,23,0.15);
        --input-bg: #ffffff;
        --input-text: #0f172a;
        --input-border: #cbd5e1;
        --placeholder: #64748b;
        --focus: #2563eb;
        --btn-start: #2563eb;
        --btn-end: #7c3aed;
        --success-bg: rgba(16,185,129,0.12);
        --success-text: #065f46;
        --error-bg: rgba(239,68,68,0.12);
        --error-text: #991b1b;
    }
}

/* ================================
   COLLAPSIBLE INFO ACCORDION
   ================================ */

.info-accordion {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
    border: 2px solid rgba(37, 99, 235, 0.2);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    backface-visibility: hidden;
    isolation: isolate; /* keep text on main rasterization layer */
    contain: paint;     /* avoid unnecessary composite of descendants */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.info-accordion:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

.info-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.info-accordion-header:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.12));
}

.info-accordion-header:active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.15));
}

.info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-title {
    flex: 1;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.info-badge {
    padding: 4px 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accordion-arrow {
    font-size: 0.9rem;
    color: #64748b;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.info-accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.info-accordion-content[style*="display: block"] {
    padding: 20px;
    max-height: 2000px;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-highlight {
    padding: 14px 18px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    color: #78350f;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-block {
    padding: 14px 18px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 8px;
    border-left: 3px solid #2563eb;
}

.info-block strong {
    display: block;
    color: #1e40af;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.info-block p {
    color: #1e293b;
    margin: 0;
    line-height: 1.6;
    font-size: 0.9rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.info-list li {
    padding: 6px 0;
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-list li strong {
    display: inline;
    color: #0f172a;
    font-weight: 600;
}

.info-recommendation {
    padding: 14px 18px;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-left: 4px solid #2563eb;
    border-radius: 8px;
    color: #1e40af;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-recommendation strong {
    color: #1e3a8a;
}

/* Dark mode adjustments */
.theme-dark .info-accordion,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .info-accordion {
        background: rgba(255, 255, 255, 0.98);
    }
}

.theme-dark .info-accordion-header,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .info-accordion-header {
        background: linear-gradient(135deg, rgba(219, 234, 254, 0.5), rgba(233, 213, 255, 0.5));
    }
}

.theme-dark .info-accordion-header:hover,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .info-accordion-header:hover {
        background: linear-gradient(135deg, rgba(219, 234, 254, 0.7), rgba(233, 213, 255, 0.7));
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .info-accordion-header {
        padding: 14px 16px;
        flex-wrap: wrap;
    }
    
    .info-title {
        font-size: 0.95rem;
        flex: 1 1 100%;
        margin-bottom: 8px;
    }
    
    .info-badge {
        font-size: 0.7rem;
        padding: 3px 10px;
    }
    
    .info-accordion-content[style*="display: block"] {
        padding: 16px;
    }
    
    .info-section {
        gap: 14px;
    }
    
    .info-highlight,
    .info-block,
    .info-recommendation {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    
    .info-list li {
        font-size: 0.85rem;
    }
}

/* ================================
   END COLLAPSIBLE INFO ACCORDION
   ================================ */

/* ULTRA-SPECIFIC: Force heading to ALWAYS be dark - override everything */
h1,
.header-row h1,
body h1,
html body h1,
body.theme-dark h1,
html body.theme-dark h1,
.header-row h1 span,
body .header-row h1 span,
html body .header-row h1 span {
    color: #0f172a !important;
}

/* Media query version with even higher specificity */
@media (prefers-color-scheme: dark) {
    h1,
    .header-row h1,
    body h1,
    html body h1,
    body:not(.theme-override) h1,
    html body:not(.theme-override) h1,
    .header-row h1 span,
    body .header-row h1 span,
    html body .header-row h1 span,
    body:not(.theme-override) .header-row h1 span {
        color: #0f172a !important;
    }
}

/* Footer Styles - Ensure dark text in dark mode */
.app-footer {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    margin-top: 48px;
    text-align: center;
}

.app-footer p {
    color: #1e293b;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.app-footer p:last-child {
    margin-bottom: 0;
}

.app-footer strong {
    color: #0f172a;
    font-weight: 600;
}

.app-footer a {
    color: var(--focus);
    text-decoration: none;
    font-weight: 500;
}

.app-footer a:hover {
    text-decoration: underline;
}

/* Dark mode: Force dark text in footer */
.theme-dark .app-footer p,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .app-footer p {
        color: #1e293b !important;
    }
}

.theme-dark .app-footer strong,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .app-footer strong {
        color: #0f172a !important;
    }
}

.theme-dark .app-footer a,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .app-footer a {
        color: #2563eb !important;
    }
}

/* Information Banner - Light background with DARK text */
.info-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.15));
    border-left: 4px solid var(--focus);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    isolation: isolate;
    contain: paint;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dark mode: Solid light background with dark text */
.theme-dark .info-banner,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .info-banner {
        background: linear-gradient(135deg, rgba(219, 234, 254, 0.98), rgba(233, 213, 255, 0.98));
        border-left: 4px solid #2563eb;
        border: 1px solid rgba(37, 99, 235, 0.4);
    }
}

.info-banner h3 {
    color: #0f172a;
    font-size: 1.15rem;
    margin-bottom: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Force dark text in banner */
.theme-dark .info-banner h3,
@media (prefers-color-scheme: dark) {
    body .info-banner h3 {
        color: #0f172a !important;
    }
}

.info-banner p {
    color: #1e293b;
    margin: 10px 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Force dark text for paragraphs */
.theme-dark .info-banner p,
@media (prefers-color-scheme: dark) {
    body .info-banner p {
        color: #1e293b !important;
    }
}

.info-banner strong {
    color: #1e40af;
    font-weight: 600;
}

/* Force dark blue for strong text */
.theme-dark .info-banner strong,
@media (prefers-color-scheme: dark) {
    body .info-banner strong {
        color: #1e40af !important;
    }
}

.info-banner ul {
    margin: 16px 0 0 24px;
    color: #1e293b;
    list-style: none;
    padding: 0;
}

.info-banner ul li {
    margin: 10px 0;
    padding-left: 28px;
    position: relative;
    line-height: 1.6;
    color: #1e293b;
}

/* Force dark text for list items */
.theme-dark .info-banner ul li,
@media (prefers-color-scheme: dark) {
    body .info-banner ul li {
        color: #1e293b !important;
    }
}

.info-banner ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
}

.info-banner ul li:nth-child(1)::before,
.info-banner ul li:nth-child(2)::before {
    content: '✅';
    font-size: 16px;
    line-height: 18px;
}

.info-banner ul li:nth-child(3)::before {
    content: '⚠️';
    font-size: 16px;
    line-height: 18px;
}

/* Modern Theme Toggle Button */
.theme-toggle {
    position: relative;
}

.theme-toggle-btn {
    position: relative;
    width: 64px;
    height: 32px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    border: 2px solid #94a3b8;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 2px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* FIXED: Add proper dark mode toggle background */
.theme-dark .theme-toggle-btn {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-color: #475569;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .theme-toggle-btn {
        background: linear-gradient(135deg, #1e293b, #0f172a);
        border-color: #475569;
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
    }
}

.theme-toggle-btn:hover {
    /* Avoid scaling to prevent text blurring due to compositing */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.theme-dark .theme-toggle-btn:hover {
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(6, 182, 212, 0.2);
}

@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .theme-toggle-btn:hover {
        box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(6, 182, 212, 0.2);
    }
}

/* FIXED: Slider position and animation */
.theme-toggle-slider {
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-position 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    left: 4px;
}

/* FIXED: Animated slider movement for dark mode */
.theme-dark .theme-toggle-slider {
    left: calc(100% - 28px);
    background: #0f172a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .theme-toggle-slider {
        left: calc(100% - 28px);
        background: #0f172a;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }
}

.theme-icon {
    transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
    transform: rotate(20deg) scale(1.1);
}

/* Enhanced Save Button Styling */
.save-button-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.button-save {
    position: relative;
    min-width: 280px;
    padding: 18px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Gradient background */
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
    background-size: 200% 100%;
    background-position: 0% 0%;
    
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 
        0 4px 12px rgba(37, 99, 235, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Dark mode adjustments - keep same button styling */
.theme-dark .button-save,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .button-save {
        background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
        background-size: 200% 100%;
        box-shadow: 
            0 4px 16px rgba(37, 99, 235, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.2),
            inset 0 -2px 8px rgba(0, 0, 0, 0.2);
    }
}

.button-save:hover {
    /* Avoid scaling to keep text crisp in embedded webview */
    transform: translateY(-2px);
    background-position: 100% 0%;
    box-shadow: 
        0 8px 24px rgba(37, 99, 235, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.theme-dark .button-save:hover,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .button-save:hover {
        box-shadow: 
            0 8px 28px rgba(37, 99, 235, 0.5),
            0 4px 8px rgba(0, 0, 0, 0.2),
            inset 0 -2px 8px rgba(0, 0, 0, 0.2);
    }
}

.button-save:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(37, 99, 235, 0.4),
        inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.button-save:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    background-position: 0% 0%;
}

/* Button icon */
.button-save .icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.button-save:hover .icon {
    transform: scale(1.2) rotate(5deg);
}

.button-save:active .icon {
    transform: scale(1) rotate(0deg);
}

/* Loading spinner */
.button-save.loading .icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shimmer effect */
.button-save::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.button-save:hover::before {
    left: 100%;
}

/* Pulse animation on page load */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 4px 12px rgba(37, 99, 235, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 
            0 6px 20px rgba(37, 99, 235, 0.5),
            0 3px 6px rgba(0, 0, 0, 0.15);
    }
}

.button-save.pulse {
    animation: pulse 2s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .button-save {
        min-width: 100%;
        padding: 16px 32px;
        font-size: 1rem;
    }
}

/* ================================
   SUCCESS/ERROR MESSAGE BANNER
   ================================ */

#result {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    min-width: 320px;
    max-width: 600px;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

#result.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid #047857;
}

#result.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 2px solid #b91c1c;
}

#result.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 2px solid #b45309;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    #result {
        min-width: calc(100% - 40px);
        max-width: calc(100% - 40px);
        top: 10px;
        font-size: 0.9rem;
        padding: 12px 16px;
    }
}

/* ================================
   DEVELOPER MODE BADGE
   ================================ */

.dev-mode-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    box-shadow: 
        0 2px 8px rgba(245, 158, 11, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: help;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: devModePulseSubtle 3s ease-in-out infinite;
}

.dev-mode-badge::before {
    content: '🔓';
    font-size: 0.9rem;
}

@keyframes devModePulseSubtle {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 2px 8px rgba(245, 158, 11, 0.3),
            0 1px 3px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 
            0 3px 12px rgba(245, 158, 11, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.15);
    }
}

.dev-mode-badge:hover {
    /* Avoid scaling to reduce text blur */
    transform: none;
    box-shadow: 
        0 4px 16px rgba(245, 158, 11, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Dark mode adjustments */
.theme-dark .dev-mode-badge,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .dev-mode-badge {
        box-shadow: 
            0 2px 12px rgba(245, 158, 11, 0.4),
            0 1px 3px rgba(0, 0, 0, 0.2);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .dev-mode-badge {
        bottom: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

/* ================================
   MODERN UNIFIED FOOTER
   ================================ */

.app-footer-modern {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 32px;
    margin-top: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    isolation: isolate;
    contain: paint;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-notice {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #2563eb;
    color: #1e293b !important;
    line-height: 1.6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.footer-notice strong {
    color: #0f172a !important;
    font-weight: 600;
}

.footer-links {
    text-align: center;
    color: #64748b !important;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.footer-links span {
    color: #64748b !important;
}

.footer-separator {
    color: #cbd5e1 !important;
    margin: 0 4px;
}

.footer-links a {
    color: #2563eb !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline;
}

/* Dark mode: Keep footer readable */
@media (prefers-color-scheme: dark) {
    .app-footer-modern {
        background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    }
    
    .footer-notice {
        background: white !important;
        color: #1e293b !important;
    }
    
    .footer-notice strong {
        color: #0f172a !important;
    }
    
    .footer-links {
        color: #64748b !important;
    }
    
    .footer-links span {
        color: #64748b !important;
    }
    
    .footer-links a {
        color: #2563eb !important;
    }
}

.theme-dark .app-footer-modern {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
}

.theme-dark .footer-notice {
    background: white !important;
    color: #1e293b !important;
}

.theme-dark .footer-notice strong {
    color: #0f172a !important;
}

.theme-dark .footer-links {
    color: #64748b !important;
}

.theme-dark .footer-links span {
    color: #64748b !important;
}

.theme-dark .footer-links a {
    color: #2563eb !important;
}

/* Mobile responsive footer */
@media (max-width: 768px) {
    .app-footer-modern {
        padding: 24px;
    }
    
    .footer-notice {
        padding: 16px;
        font-size: 0.85rem;
    }
    
    .footer-links {
        font-size: 0.8rem;
        flex-direction: column;
    }
    
    .footer-separator {
        display: none;
    }
}

/* ================================
   MODERN TOAST NOTIFICATION
   ================================ */

.support-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: white;
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #10b981;
    min-width: 320px;
    max-width: 420px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    isolation: isolate;
    contain: paint;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.support-toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.toast-text {
    flex: 1;
}

.toast-text strong {
    display: block;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.toast-text p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

/* Dark mode toast */
.theme-dark .support-toast,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .support-toast {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

/* Mobile responsive toast */
@media (max-width: 768px) {
    .support-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .toast-content {
        padding: 14px 16px;
    }
    
    .toast-text strong {
        font-size: 0.9rem;
    }
    
    .toast-text p {
        font-size: 0.8rem;
    }
}

/* ================================
   MODERN SECONDARY BUTTONS
   ================================ */

.button-secondary {
    position: relative;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease;
    backface-visibility: hidden;
    
    /* Modern gradient border effect */
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #2563eb, #7c3aed) border-box;
    
    color: #2563eb;
    text-shadow: none;
    box-shadow: 
        0 2px 8px rgba(37, 99, 235, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.05);
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 200px;
}

/* Hover effect */
.button-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    box-shadow: 
        0 6px 20px rgba(37, 99, 235, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.1);
}

.button-secondary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(37, 99, 235, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Disabled state */
.button-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: linear-gradient(#f1f5f9, #f1f5f9) padding-box,
                linear-gradient(135deg, #cbd5e1, #94a3b8) border-box;
    color: #94a3b8;
    transform: none;
}

/* Icon animation */
.button-secondary span {
    transition: transform 0.3s ease;
}

.button-secondary:hover:not(:disabled) span {
    transform: scale(1.1);
}

/* Shimmer effect on hover */
.button-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.button-secondary:hover::before {
    left: 100%;
}

/* Dark mode adjustments */
.theme-dark .button-secondary,
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .button-secondary {
        background: linear-gradient(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.98)) padding-box,
                    linear-gradient(135deg, #2563eb, #7c3aed) border-box;
        box-shadow: 
            0 2px 10px rgba(37, 99, 235, 0.2),
            0 1px 3px rgba(0, 0, 0, 0.1);
    }
}

.theme-dark .button-secondary:hover:not(:disabled),
@media (prefers-color-scheme: dark) {
    body:not(.theme-override) .button-secondary:hover:not(:disabled) {
        box-shadow: 
            0 6px 24px rgba(37, 99, 235, 0.4),
            0 2px 6px rgba(0, 0, 0, 0.15);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .button-secondary {
        width: 100%;
        min-width: auto;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
