/* Gloscabs - Modern Taxi Booking Platform Styles */

:root {
    --primary: #000000;
    --secondary: #FFD700;
    --accent: #00C853;
    --danger: #FF1744;
    --warning: #FF9100;
    --info: #2979FF;
    --light: #F5F5F5;
    --dark: #121212;
    --white: #FFFFFF;
    --gray: #9E9E9E;
    --success: #00E676;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

/* Dynamic Theme Overrides via body attributes */
body[data-theme-primary] {
    --primary: attr(data-theme-primary color);
}
body[data-theme-secondary] {
    --secondary: attr(data-theme-secondary color);
}
body[data-theme-background] {
    --light: attr(data-theme-background color);
}
body[data-theme-text] {
    --dark: attr(data-theme-text color);
}

/* Header */
.header {
    background: var(--primary);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header .logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
}

.header .logo span {
    color: var(--white);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
                var(--hero-bg, url('../assets/images/hero-bg.jpg')) center/cover;
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Driver Promo Section */
.driver-promo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem 2rem;
    background: var(--white);
    align-items: center;
}

.driver-promo img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

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

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

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

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.card-header {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

/* Dashboard */
.dashboard {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 250px;
    background: var(--primary);
    color: var(--white);
    padding: 1rem 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    border-left: 4px solid var(--secondary);
}

.main-content {
    flex: 1;
    padding: 2rem;
    background: var(--light);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success { background: #E8F5E9; color: #2E7D32; border-left: 4px solid #4CAF50; }
.alert-danger { background: #FFEBEE; color: #C62828; border-left: 4px solid #F44336; }
.alert-warning { background: #FFF3E0; color: #E65100; border-left: 4px solid #FF9800; }
.alert-info { background: #E3F2FD; color: #1565C0; border-left: 4px solid #2196F3; }

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-danger { background: #FFEBEE; color: #C62828; }
.badge-warning { background: #FFF3E0; color: #E65100; }
.badge-info { background: #E3F2FD; color: #1565C0; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #E0E0E0;
}

.table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--success);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Mobile Sidebar */
.mobile-sidebar {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;
    background: var(--primary);
    z-index: 2000;
    padding: 1rem;
    box-shadow: var(--shadow);
}

.mobile-sidebar.active {
    display: block;
}

/* Form Container (for login/register) */
.form-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Ride Type Cards */
.ride-type-card {
    border: 2px solid #E0E0E0;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.ride-type-card:hover, .ride-type-card.selected {
    border-color: var(--primary);
    background: rgba(0,0,0,0.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Wallet Balance */
.wallet-balance {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.wallet-balance h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* PayPal Button */
.paypal-button-container {
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }

    .dashboard { flex-direction: column; }
    .sidebar { display: none; }
    .main-content { padding: 1rem; }

    .stats-grid { grid-template-columns: 1fr; }
    .driver-promo { grid-template-columns: 1fr; }

    .hero h1 { font-size: 2rem; }

    iframe { height: 500px !important; }
}

/* Print */
@media print {
    .header, .sidebar, .btn { display: none; }
    .main-content { padding: 0; }
}

/* Chat bubble for driver-passenger communication */
.chat-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #F5F5F5;
    border-radius: 12px;
}
.chat-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    max-width: 70%;
}
.chat-bubble.user {
    background: var(--primary);
    color: white;
    margin-left: auto;
}
.chat-bubble.driver {
    background: var(--light);
    color: var(--dark);
}

/* Slide-in animation for notifications */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
