/* HopIn Combined Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==================== CSS Variables ==================== */
:root {
    /* Fonts */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Colors */
    --primary-color: hsl(96, 30%, 22%);
    --primary-hover: #253519;
    --primary-light: rgba(76, 175, 80, 0.1);
    
    /* Backgrounds */
    --bg-gradient-start: hsl(96, 30%, 22%);
    --bg-gradient-end: #253519;
    --bg-white: #dfb88e;
    --bg-light: #f5f5f5;
    
    /* Text */
    --text-primary: #000000;
    --text-secondary: #344826;
    --text-muted: #8a5226;
    
    /* Borders */
    --border-light: #253519;
    --border-primary: #253519;
    
    /* Status */
    --error-color: #f44336;
    --error-hover: #d32f2f;
    --success-color: #4caf50;
    --info-color: #2196f3;
    
    /* Buttons */
    --btn-primary-bg: #9f6a3f;
    --btn-primary-hover: #8a5226;
    --btn-secondary-bg: #f0f0f0;
    --btn-secondary-hover: #e0e0e0;
    
    /* Shadows */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-overlay: rgba(0, 0, 0, 0.5);
}

/* ==================== Global Reset ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ==================== Layout ==================== */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 8px 32px var(--shadow-light);
    width: 100%;
}

/* ==================== Logo ==================== */
.logo {
    text-align: center;
    margin-bottom: 32px;
}

.logo-image {
    width: 300px;
    height: auto;
    margin-bottom: 12px;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="tel"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--font-primary);
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--border-primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ==================== Buttons ==================== */
.btn {
    width: 100%;
    padding: 14px;
    background: var(--btn-primary-bg);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-1px);
}

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

.btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

.cancel-btn {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: var(--error-hover);
}

/* ==================== Event Page ==================== */
.event-info {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 32px;
    border: 2px solid var(--border-light);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.event-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.event-detail {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.event-detail strong {
    margin-right: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
    color: var(--text-primary);
}

/* ==================== Ride Cards ==================== */
.ride-card {
    border: 2px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ride-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.ride-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.driver-info {
    font-weight: 500;
    font-size: 1.1rem;
}

.seats-available {
    color: var(--success-color);
    font-weight: 500;
}

.seats-full {
    color: var(--error-color);
    font-weight: 500;
}

.car-info {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.driver-notes {
    background: var(--bg-light);
    padding: 8px;
    border-radius: 4px;
    font-style: italic;
    margin-top: 8px;
    border-left: 3px solid var(--primary-color);
}

.riders-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.riders-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.rider-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.no-drivers {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    background: var(--bg-light);
    border-radius: 8px;
    border: 2px dashed var(--border-light);
}

/* ==================== Modal Forms ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--shadow-overlay);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin: 0 0 24px 0;
    text-align: center;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-buttons .btn {
    margin-bottom: 0;
}

/* ==================== Notifications ==================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 2000;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: var(--success-color);
}

.notification-error {
    background: var(--error-color);
}

.notification-info {
    background: var(--info-color);
}

/* ==================== Loading Spinner ==================== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .page {
        padding: 20px;
    }
    
    .event-header,
    .section-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .event-header .btn,
    .section-header .btn {
        width: 100%;
    }
    
    .logo-image {
        width: 200px;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .btn, .cancel-btn {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .page {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}