/* Mobile Optimization CSS */
/* This file contains mobile-specific optimizations for the Best Content Creator app */

/* Touch-friendly button sizing */
@media (max-width: 768px) {
    .btn-primary,
    .btn-secondary,
    button[type="submit"],
    .tab-button {
        min-height: 44px; /* Apple's recommended minimum touch target size */
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Form inputs */
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    select,
    textarea {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    /* Ensure form labels are readable */
    label {
        font-size: 14px;
        font-weight: 500;
        margin-bottom: 8px;
    }
    
    /* Card optimizations */
    .card {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 8px;
    }
    
    /* Typography scaling */
    h1 {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 16px;
    }
    
    h2 {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    h3 {
        font-size: 18px;
        line-height: 1.4;
        margin-bottom: 8px;
    }
    
    /* Paragraph text */
    p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 16px;
    }
    
    /* Small text */
    .text-sm {
        font-size: 14px;
    }
    
    /* Navigation optimizations */
    .nav-link {
        padding: 12px 16px;
        font-size: 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Content spacing */
    .section-padding {
        padding: 24px 16px;
    }
    
    /* Grid optimizations */
    .grid-mobile-1 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Sticky elements */
    .sticky-mobile {
        position: sticky;
        top: 0;
        z-index: 50;
    }
    
    /* Modal optimizations */
    .modal-mobile {
        margin: 16px;
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }
    
    /* Table responsiveness */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Hide desktop-only elements */
    .desktop-only {
        display: none;
    }
    
    /* Show mobile-only elements */
    .mobile-only {
        display: block;
    }
    
    /* Optimize tap targets */
    a, button, input, select, textarea {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Optimize images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Content containers */
    .container-mobile {
        max-width: 100%;
        padding: 0 16px;
    }
    
    /* Status indicators */
    .status-indicator {
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 14px;
        text-align: center;
    }
    
    /* Loading states */
    .loading-mobile {
        padding: 32px 16px;
        text-align: center;
    }
    
    /* Error states */
    .error-mobile {
        padding: 16px;
        border-radius: 8px;
        margin: 16px 0;
        text-align: center;
    }
    
    /* Success states */
    .success-mobile {
        padding: 16px;
        border-radius: 8px;
        margin: 16px 0;
        text-align: center;
    }
    
    /* Form groups */
    .form-group-mobile {
        margin-bottom: 24px;
    }
    
    /* Button groups */
    .button-group-mobile {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .button-group-mobile .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Content tabs mobile */
    .content-tabs-mobile {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 16px;
    }
    
    .content-tabs-mobile .tab-button {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 12px 16px;
        border-bottom: 2px solid transparent;
        margin-bottom: -1px;
    }
    
    .content-tabs-mobile .tab-button.active {
        border-bottom-color: #000;
    }
    
    /* Progress indicators */
    .progress-mobile {
        height: 8px;
        border-radius: 4px;
        overflow: hidden;
        background-color: #e5e7eb;
        margin: 8px 0;
    }
    
    .progress-mobile .progress-bar {
        height: 100%;
        background-color: #000;
        transition: width 0.3s ease;
    }
    
    /* Spacing utilities */
    .mt-mobile { margin-top: 16px; }
    .mb-mobile { margin-bottom: 16px; }
    .ml-mobile { margin-left: 16px; }
    .mr-mobile { margin-right: 16px; }
    .mx-mobile { margin-left: 16px; margin-right: 16px; }
    .my-mobile { margin-top: 16px; margin-bottom: 16px; }
    
    .pt-mobile { padding-top: 16px; }
    .pb-mobile { padding-bottom: 16px; }
    .pl-mobile { padding-left: 16px; }
    .pr-mobile { padding-right: 16px; }
    .px-mobile { padding-left: 16px; padding-right: 16px; }
    .py-mobile { padding-top: 16px; padding-bottom: 16px; }
    
    /* Text alignment */
    .text-center-mobile { text-align: center; }
    .text-left-mobile { text-align: left; }
    .text-right-mobile { text-align: right; }
    
    /* Flexbox utilities */
    .flex-mobile { display: flex; }
    .flex-col-mobile { flex-direction: column; }
    .flex-row-mobile { flex-direction: row; }
    .justify-center-mobile { justify-content: center; }
    .justify-between-mobile { justify-content: space-between; }
    .items-center-mobile { align-items: center; }
    .items-start-mobile { align-items: flex-start; }
    .items-end-mobile { align-items: flex-end; }
    
    /* Width utilities */
    .w-full-mobile { width: 100%; }
    .w-auto-mobile { width: auto; }
    
    /* Display utilities */
    .block-mobile { display: block; }
    .inline-mobile { display: inline; }
    .inline-block-mobile { display: inline-block; }
    .hidden-mobile { display: none; }
    
    /* Border radius */
    .rounded-mobile { border-radius: 8px; }
    .rounded-lg-mobile { border-radius: 12px; }
    .rounded-xl-mobile { border-radius: 16px; }
    
    /* Shadows */
    .shadow-mobile { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
    .shadow-lg-mobile { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    /* Desktop-only elements */
    .desktop-only {
        display: block;
    }
    
    /* Mobile-only elements */
    .mobile-only {
        display: none;
    }
    
    /* Tablet-specific grid */
    .grid-tablet-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .grid-tablet-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    /* Tablet button sizing */
    .btn-primary,
    .btn-secondary,
    button[type="submit"] {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    /* Tablet form inputs */
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    select,
    textarea {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    /* Tablet typography */
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    /* Tablet spacing */
    .section-padding {
        padding: 32px 24px;
    }
    
    .container-mobile {
        max-width: 100%;
        padding: 0 24px;
    }
}

/* Desktop optimizations */
@media (min-width: 1024px) {
    /* Mobile-only elements */
    .mobile-only {
        display: none;
    }
    
    /* Desktop-only elements */
    .desktop-only {
        display: block;
    }
    
    /* Desktop grid */
    .grid-desktop-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    
    .grid-desktop-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }
    
    /* Desktop button sizing */
    .btn-primary,
    .btn-secondary,
    button[type="submit"] {
        padding: 12px 32px;
        font-size: 16px;
    }
    
    /* Desktop form inputs */
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    select,
    textarea {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    /* Desktop typography */
    h1 {
        font-size: 48px;
    }
    
    h2 {
        font-size: 32px;
    }
    
    h3 {
        font-size: 24px;
    }
    
    /* Desktop spacing */
    .section-padding {
        padding: 48px 32px;
    }
    
    .container-mobile {
        max-width: 1200px;
        padding: 0 32px;
        margin: 0 auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .section-padding {
        padding: 16px;
    }
    
    h1 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    /* Optimize navigation for landscape */
    .nav-mobile {
        padding: 8px 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
    .dark-mode-text {
        color: #ffffff;
    }
    
    .dark-mode-bg {
        background-color: #1a1a1a;
    }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }
    
    .btn-secondary {
        border: 2px solid #000;
    }
    
    input, select, textarea {
        border: 2px solid #000;
    }
} 