/* Main stylesheet for Django app - Mobile Enhanced */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
}

/* Base styles with mobile-first approach */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Enhanced Buttons for mobile */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    min-height: 44px; /* Minimum touch target size */
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Enhanced Cards for mobile */
.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 16px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Mobile Navigation Enhancements - mobile menu toggle removed */

/* Mobile-specific grid layouts */
.mobile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

/* Touch-friendly spacing */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Mobile form enhancements */
input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Mobile-first responsive design */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 12px;
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .card {
        border-radius: 8px;
        padding: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Stack hero buttons vertically on very small screens */
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Make service cards full width - but only for services list, not appointments */
    .services-list .service-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .btn {
        min-height: 48px;
    }
    
    /* Mobile navigation styles - mobile menu toggle removed */
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        width: 100%;
        margin-bottom: 8px;
        padding: 16px 20px;
        border-radius: 12px;
        display: flex;
        align-items: center;
    }
    
    /* Mobile dropdown adjustments */
    .customer-dropdown .dropdown-menu {
        position: fixed;
        top: 60px;
        right: 20px;
        left: 20px;
        width: auto;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    /* Service grid mobile optimization */
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 20px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .container {
        padding: 20px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Duplicate styles removed - using the enhanced version above */

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.nav-links a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

/* Customer dropdown styles */
.customer-dropdown {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.customer-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(102, 126, 234, 0.1);
}

.customer-name:hover {
    background: rgba(102, 126, 234, 0.2);
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.customer-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    min-width: 200px;
    z-index: 1001;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    overflow: visible;
}

.customer-dropdown.active .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 10px;
    margin: 0.25rem;
}

.dropdown-menu a:hover {
    background: #667eea;
    color: white;
}

.dropdown-menu .logout-btn {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

/* Cart icon styles */
.cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    color: #667eea;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    position: relative;
}

.cart-icon:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 2D Icons SVG */
.nav-icon-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-right: 0.5rem;
    transition: all 0.3s;
    opacity: 0.8;
}

.nav-links a:hover .nav-icon-svg {
    opacity: 1;
    transform: scale(1.1);
}

.cart-icon-svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}


.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Duplicate .btn styles removed - using enhanced version above */

.btn-secondary {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

/* Duplicate .container styles removed - using enhanced version above */

.messages {
    margin-bottom: 2rem;
}

.message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-left: 4px solid #667eea;
}

.message.success {
    border-left-color: #28a745;
}

.message.error {
    border-left-color: #dc3545;
}

.footer {
    background: rgba(0,0,0,0.1);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}