/**
 * ERP/Front Mobile Navigation & Styles
 * PratikStore Mobil Entegrasyonu
 *
 * Framework: Tailwind CSS (CDN) compatible
 * Referans: mobil tasarımlar
 */

/* ============================================
   0. MATERIAL ICONS ROUND FONT
   ============================================ */

.material-icons-round {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   1. MOBILE BOTTOM NAVIGATION (Front/ERP)
   ============================================ */

.erp-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    -webkit-tap-highlight-color: transparent;
}

/* Dark Mode */
.dark .erp-mobile-nav {
    background: #0f172a;
    border-color: #334155;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
}

/* Navigation Links */
.erp-mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 8px 4px;
}

.erp-mobile-nav a:hover,
.erp-mobile-nav a.active {
    color: #f36f21;
}

.erp-mobile-nav a:active {
    transform: scale(0.95);
}

/* Dark Mode Links */
.dark .erp-mobile-nav a {
    color: #64748b;
}

.dark .erp-mobile-nav a:hover,
.dark .erp-mobile-nav a.active {
    color: #f36f21;
}

/* Icons */
.erp-mobile-nav .nav-icon {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 2px;
}

/* Labels */
.erp-mobile-nav .nav-label {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
}

/* Hide on desktop (lg breakpoint = 1024px for Tailwind) */
@media (min-width: 1024px) {
    .erp-mobile-nav {
        display: none !important;
    }
}

/* ============================================
   2. BODY SPACING FOR MOBILE NAV
   ============================================ */

@media (max-width: 1023px) {
    .erp-mobile-body {
        padding-bottom: 80px;
    }

    /* Footer margin adjustment */
    .erp-mobile-body footer {
        margin-bottom: 64px;
    }
}

/* ============================================
   3. MOBILE HEADER (Front/ERP)
   ============================================ */

@media (max-width: 767px) {
    /* Kompakt header for mobile */
    .erp-header {
        height: 60px !important;
        padding: 0 16px !important;
    }

    .erp-header .logo-img {
        height: 32px !important;
    }

    /* Hide desktop nav links */
    .erp-header .desktop-nav {
        display: none !important;
    }

    /* Mobile menu button */
    .erp-mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        color: #64748b;
        background: transparent;
        border: none;
        border-radius: 8px;
        transition: background 0.2s ease;
    }

    .erp-mobile-menu-btn:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .dark .erp-mobile-menu-btn:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* ============================================
   4. MOBILE HERO SECTION
   ============================================ */

@media (max-width: 767px) {
    .erp-hero {
        padding-top: 100px !important;
        padding-bottom: 60px !important;
    }

    .erp-hero h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }

    .erp-hero p {
        font-size: 1rem !important;
    }

    /* CTA Buttons stack on mobile */
    .erp-hero .cta-buttons {
        flex-direction: column !important;
        width: 100%;
    }

    .erp-hero .cta-buttons a {
        width: 100% !important;
    }
}

/* ============================================
   5. MOBILE FEATURES GRID
   ============================================ */

@media (max-width: 767px) {
    .erp-features-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .erp-feature-card {
        padding: 20px !important;
    }

    .erp-feature-card .feature-icon {
        width: 48px !important;
        height: 48px !important;
    }

    .erp-feature-card h3 {
        font-size: 1.125rem !important;
    }
}

/* ============================================
   6. MOBILE CONTACT FORM
   ============================================ */

@media (max-width: 767px) {
    .erp-contact-grid {
        grid-template-columns: 1fr !important;
    }

    .erp-contact-form {
        padding: 24px !important;
    }

    .erp-contact-form .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   7. MOBILE FOOTER
   ============================================ */

@media (max-width: 767px) {
    .erp-footer {
        padding: 40px 16px 100px !important;
    }

    .erp-footer .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .erp-footer .footer-logo {
        margin-bottom: 16px;
    }

    .erp-footer .footer-links {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* ============================================
   8. MOBILE OFFCANVAS MENU (Front)
   ============================================ */

.erp-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 320px;
    height: 100%;
    background: #ffffff;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.erp-mobile-drawer.open {
    transform: translateX(0);
}

.dark .erp-mobile-drawer {
    background: #0f172a;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

.erp-mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.dark .erp-mobile-drawer-header {
    border-color: #334155;
}

.erp-mobile-drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.erp-mobile-drawer-close:hover {
    background: #f1f5f9;
}

.dark .erp-mobile-drawer-close:hover {
    background: #1e293b;
}

.erp-mobile-drawer-nav {
    padding: 16px 0;
}

.erp-mobile-drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: #334155;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.erp-mobile-drawer-nav a:hover {
    background: #f8fafc;
    color: #f36f21;
}

.erp-mobile-drawer-nav a.active {
    color: #f36f21;
    background: rgba(243, 111, 33, 0.05);
}

.dark .erp-mobile-drawer-nav a {
    color: #e2e8f0;
}

.dark .erp-mobile-drawer-nav a:hover {
    background: #1e293b;
    color: #f36f21;
}

.erp-mobile-drawer-nav a .material-icons-round {
    font-size: 20px;
    color: #94a3b8;
}

.erp-mobile-drawer-nav a:hover .material-icons-round,
.erp-mobile-drawer-nav a.active .material-icons-round {
    color: #f36f21;
}

/* Drawer Overlay */
.erp-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.erp-mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   9. MOBILE FORM IMPROVEMENTS
   ============================================ */

@media (max-width: 767px) {
    /* Larger touch targets */
    .erp-form input[type="text"],
    .erp-form input[type="email"],
    .erp-form input[type="tel"],
    .erp-form input[type="password"],
    .erp-form textarea,
    .erp-form select {
        min-height: 48px !important;
        font-size: 16px !important; /* Prevents iOS zoom */
    }

    .erp-form button[type="submit"] {
        min-height: 52px !important;
        font-size: 16px !important;
    }
}

/* ============================================
   10. MOBILE ANIMATIONS
   ============================================ */

@media (max-width: 767px) {
    /* Disable heavy animations on mobile */
    .animate-bounce {
        animation: none !important;
    }

    /* Reduce motion for accessibility */
    @media (prefers-reduced-motion: reduce) {
        .erp-mobile-drawer,
        .erp-mobile-overlay {
            transition: none !important;
        }
    }
}

/* ============================================
   11. SAFE AREA SUPPORT (iPhone X+)
   ============================================ */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .erp-mobile-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(64px + env(safe-area-inset-bottom));
    }

    .erp-mobile-body {
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* ============================================
   12. LOGIN/CTA BUTTON IN MOBILE NAV
   ============================================ */

.erp-mobile-nav .nav-login {
    background: #f36f21;
    color: #ffffff !important;
    border-radius: 8px;
    padding: 8px 12px !important;
    margin: 4px;
    flex: 0 0 auto;
}

.erp-mobile-nav .nav-login:hover {
    background: #d35a1a;
}

.erp-mobile-nav .nav-login .nav-icon {
    font-size: 20px;
}

.erp-mobile-nav .nav-login .nav-label {
    font-weight: 600;
}
