/* Nail Care Appointment System - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.8rem;
    margin: 0;
}

nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

.language-switcher {
    color: white;
    font-size: 0.9rem;
}

.language-switcher a {
    color: white;
    text-decoration: none;
    padding: 0.3rem 0.5rem;
}

.language-switcher a:hover {
    text-decoration: underline;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #667eea;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #5568d3;
}

.btn-primary {
    background-color: #667eea;
}

.btn-primary:hover {
    background-color: #5568d3;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    margin: 0.2rem;
}

/* Forms */
.booking-form-container,
.login-container {
    max-width: 600px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.booking-form-container h2,
.login-container h2 {
    margin-bottom: 1.5rem;
    color: #667eea;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading */
.loading {
    display: none;
    padding: 0.5rem;
    color: #667eea;
    font-style: italic;
}

/* Admin Panel */
.admin-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-container h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.appointments-table-container {
    overflow-x: auto;
    margin-top: 2rem;
}

.appointments-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.appointments-table thead {
    background-color: #667eea;
    color: white;
}

.appointments-table th,
.appointments-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.appointments-table tbody tr:hover {
    background-color: #f8f9fa;
}

.notes-row {
    background-color: #f8f9fa;
    font-size: 0.9rem;
}

.notes-row td {
    padding-left: 2rem;
    color: #666;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-confirmed {
    background-color: #28a745;
    color: white;
}

.status-completed {
    background-color: #17a2b8;
    color: white;
}

.status-cancelled {
    background-color: #dc3545;
    color: white;
}

/* Hours Badge */
.hours-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.hours-badge.past {
    background-color: #6c757d;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-box h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    .container {
        padding: 0 15px;
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
        padding: 1rem 15px;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    nav {
        justify-content: center;
        margin-top: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .language-switcher {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
    
    main {
        padding: 1rem 0;
    }
    
    .hero {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .appointments-table-container {
        overflow-x: visible;
    }
    
    .appointments-table {
        font-size: 0.9rem;
        display: block;
        width: 100%;
    }
    
    .appointments-table thead {
        display: none;
    }
    
    .appointments-table tbody {
        display: block;
        width: 100%;
    }
    
    .appointments-table tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 1rem;
        background: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .appointments-table td {
        display: block;
        padding: 0.75rem 0;
        text-align: left;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .appointments-table tr td:last-child {
        border-bottom: none;
    }
    
    .appointments-table td:before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        color: #667eea;
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .appointments-table td strong {
        display: block;
        font-size: 1.1rem;
        color: #333;
    }
    
    .appointments-table td .btn-edit-time {
        margin-top: 0.5rem;
        display: inline-block;
    }
    
    .appointments-table td form {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .appointments-table td .btn-sm {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .notes-row {
        margin-top: -1.5rem;
        border-top: none !important;
    }
    
    .notes-row td {
        padding-left: 0;
        border-top: 2px solid #ddd;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        background-color: #f8f9fa;
    }
    
    .notes-row td:before {
        display: block;
    }
    
    .booking-form-container,
    .login-container {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-box {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.3rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .booking-form-container,
    .login-container {
        padding: 1rem;
    }
    
    .form-group #captcha_image {
        max-width: 100%;
        height: auto;
    }
    
    .form-group button[type="button"] {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* CAPTCHA Styles */
.form-group #captcha_image {
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.form-group #captcha_image:hover {
    opacity: 0.8;
}

.form-group input[name="captcha_code"] {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    font-size: 1.1rem;
}

