/* Mobile Common Styles - Shared Mobile Optimizations */

/* Mobile-first responsive utilities */
.mobile-only {
    display: block;
}

.tablet-up {
    display: none;
}

.desktop-up {
    display: none;
}

/* Touch-friendly button and link sizes */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile-optimized typography */
@media (max-width: 767px) {
    body {
        font-size: 16px;
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    h1 {
        font-size: 28px;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 24px;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 20px;
        line-height: 1.4;
    }
    
    p {
        margin-bottom: 16px;
    }
}

/* Mobile navigation enhancements */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 12px;
    cursor: pointer;
    z-index: 1000;
}

.mobile-menu-toggle .hamburger {
    width: 20px;
    height: 2px;
    background-color: #333;
    position: relative;
    transition: all 0.3s ease;
}

.mobile-menu-toggle .hamburger::before,
.mobile-menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

.mobile-menu-toggle .hamburger::before {
    top: -6px;
}

.mobile-menu-toggle .hamburger::after {
    bottom: -6px;
}

.mobile-menu-toggle.active .hamburger {
    background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Mobile menu styles */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 999;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    margin-bottom: 20px;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: #26d1c3;
}

/* Mobile-specific spacing */
.mobile-spacing {
    padding: 20px;
}

.mobile-spacing-sm {
    padding: 15px;
}

.mobile-spacing-lg {
    padding: 30px 20px;
}

/* Mobile grid utilities */
.mobile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.mobile-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Mobile card optimizations */
.mobile-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* Mobile form optimizations */
.mobile-form input,
.mobile-form select,
.mobile-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.mobile-form button {
    width: 100%;
    padding: 15px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* Mobile image optimizations */
.mobile-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Mobile button styles */
.mobile-btn {
    display: inline-block;
    padding: 15px 25px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

.mobile-btn:hover {
    background-color: #005a87;
    color: white;
}

.mobile-btn-secondary {
    background-color: #6c757d;
}

.mobile-btn-secondary:hover {
    background-color: #545b62;
}

/* Mobile modal styles */
.mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-modal.active {
    display: flex;
}

.mobile-modal-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

/* Mobile loading states */
.mobile-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.mobile-loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile responsive breakpoints */
@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    
    .tablet-up {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-menu {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .desktop-up {
        display: block;
    }
}

/* Mobile accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mobile-card {
        border: 2px solid #000;
    }
    
    .mobile-btn {
        border: 2px solid #000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .mobile-card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .mobile-form input,
    .mobile-form select,
    .mobile-form textarea {
        background-color: #4a5568;
        color: #e2e8f0;
        border-color: #718096;
    }
}
