/* ============================================
   Bootstrap Custom Styles
   ============================================ */

:root {
    --bs-primary: #00A54F;
    --bs-primary-rgb: 0, 165, 79;
    --bs-secondary: #FEF200;
    --bs-danger: #BF1E2E;
    --bs-success: #00A54F;
    --bs-warning: #FEF200;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Custom Button Styles */
.btn-primary {
    background-color: #00A54F;
    border-color: #00A54F;
}

.btn-primary:hover {
    background-color: #00843F;
    border-color: #00843F;
}

.btn-outline-primary {
    color: #00A54F;
    border-color: #00A54F;
}

.btn-outline-primary:hover {
    background-color: #00A54F;
    border-color: #00A54F;
    color: white;
}

/* Stepper Styles - Material Design Inspired */
.stepper-container {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #E9ECEF;
    color: #6C757D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    border: 2px solid #E9ECEF;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    position: relative;
}

.stepper-step.active .step-number {
    background-color: #00A54F;
    color: white;
    border-color: #00A54F;
    box-shadow: 0 0 0 8px rgba(0, 165, 79, 0.1);
    transform: scale(1.1);
}

.stepper-step.completed .step-number {
    background-color: #00A54F;
    color: white;
    border-color: #00A54F;
}

.stepper-step.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6C757D;
    text-align: center;
    transition: all 0.3s ease;
}

.stepper-step.active .step-label {
    color: #00A54F;
    font-weight: 600;
}

.stepper-step.completed .step-label {
    color: #00A54F;
}

.stepper-line {
    flex: 1;
    height: 3px;
    background-color: #E9ECEF;
    margin: 0 1rem;
    margin-top: -24px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.stepper-step.completed + .stepper-line {
    background-color: #00A54F;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #E9ECEF;
}

.step-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-header p {
    margin: 0;
    color: #6C757D;
    font-size: 0.875rem;
}

.step-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E9ECEF;
}

/* Review Summary */
.review-summary {
    margin-top: 1rem;
}

.review-section {
    background: #F8F9FA;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    border-left: 3px solid #00A54F;
}

.review-section h4 {
    margin: 0 0 0.75rem 0;
    color: #00A54F;
    font-size: 1rem;
    font-weight: 600;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.review-item {
    padding: 0.375rem 0;
    border-bottom: 1px solid #E9ECEF;
}

.review-item:last-child {
    border-bottom: none;
}

.review-item.full-width {
    grid-column: 1 / -1;
}

.review-item strong {
    color: #6C757D;
    display: inline-block;
    min-width: 150px;
    font-weight: 600;
}

/* Dashboard Panel */
.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.header-top-bar {
    background: linear-gradient(135deg, #00A54F 0%, #00843F 100%);
    font-size: 0.875rem;
}

.header-top-bar a:hover {
    opacity: 0.9;
}

.navbar {
    border-bottom: 3px solid #00A54F;
}

.logo-icon-wrapper {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00A54F 0%, #00843F 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 165, 79, 0.2);
}

.logo-icon-wrapper .material-icons {
    color: white;
    font-size: 2rem;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    letter-spacing: -0.5px;
}

.badge-merchant {
    background: linear-gradient(135deg, #00A54F 0%, #00843F 100%);
    color: white;
    font-size: 0.625rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 165, 79, 0.2);
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.navbar-nav .nav-link .material-icons {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(0, 165, 79, 0.08);
    color: #00A54F;
}

.navbar-nav .nav-link:hover .material-icons {
    transform: scale(1.1);
}

.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(0, 165, 79, 0.1) 0%, rgba(0, 132, 63, 0.1) 100%);
    color: #00A54F;
    font-weight: 600;
}

.navbar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, #00A54F 0%, #00843F 100%);
    border-radius: 0 4px 4px 0;
}

.dashboard-main {
    background: #f8f9fa;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-badge {
    background-color: rgba(0, 165, 79, 0.1);
    color: #00A54F;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #6C757D;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item:hover {
    background-color: #F8F9FA;
    color: #212529;
}

.nav-item.active {
    background-color: rgba(0, 165, 79, 0.1);
    color: #00A54F;
}

.nav-item.logout {
    color: #BF1E2E;
}

.nav-item.logout:hover {
    background-color: rgba(191, 30, 46, 0.1);
}

/* Enhanced Cards */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important;
}

/* Section Header */
.section-header-panel {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid #00A54F;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-header-panel h2 {
    margin: 0 0 0.25rem 0;
    color: #212529;
    font-size: 1.5rem;
    font-weight: 700;
}

.section-description {
    margin: 0;
    color: #6C757D;
    font-size: 0.875rem;
}

/* Form Enhancements */
.form-control,
.form-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #00A54F;
    box-shadow: 0 0 0 0.2rem rgba(0, 165, 79, 0.25);
    transform: translateY(-1px);
}

.form-control:hover:not(:focus),
.form-select:hover:not(:focus) {
    border-color: #00A54F;
}

/* Passenger Row Enhancements */
.passenger-row {
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.passenger-row:hover {
    box-shadow: 0 4px 8px rgba(0, 165, 79, 0.1) !important;
}

.passenger-row .form-control:valid,
.passenger-row .form-select:valid {
    border-left: 2px solid #00A54F;
}

.passenger-row .form-control:invalid:not(:placeholder-shown) {
    border-left: 2px solid #BF1E2E;
}

/* User Search Results */
#user-search-results {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.user-result-item {
    transition: all 0.2s ease;
}

.user-result-item:hover {
    background-color: #f8f9fa !important;
    transform: translateX(5px);
    border-left: 3px solid #00A54F;
}

.existing-user-section {
    border-left: 4px solid #00A54F;
}

.divider-section {
    margin: 1.5rem 0;
}

.form-label {
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.form-label .material-icons {
    font-size: 1rem;
    color: #00A54F;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background-color: rgba(254, 242, 0, 0.2);
    color: #856404;
}

.status-assigned,
.status-on-the-way {
    background-color: rgba(0, 165, 79, 0.1);
    color: #00843F;
}

.status-completed {
    background-color: rgba(0, 165, 79, 0.15);
    color: #00843F;
}

/* Progress Bar */
.progress {
    height: 10px;
    border-radius: 5px;
    background-color: #E9ECEF;
}

.progress-bar {
    background: linear-gradient(90deg, #00A54F, #00C65F);
    border-radius: 5px;
}

/* Mobile & Tablet Responsive Styles */
@media (max-width: 768px) {
    /* Stepper Responsive */
    .stepper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stepper-line {
        width: 3px;
        height: 40px;
        margin: 0;
        margin-top: 0;
        margin-left: 24px;
    }
    
    .step-actions {
        flex-direction: column-reverse;
    }
    
    .step-actions .btn {
        width: 100%;
    }
    
    /* Seat Map Responsive */
    .seat-map {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .seat {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
    
    .seat-label {
        font-size: 0.5rem;
    }
    
    /* Ticket Cards Mobile */
    .ticket-card {
        margin-bottom: 1rem;
    }
    
    .ticket-header-gradient {
        padding: 1rem;
    }
    
    .ticket-header-gradient h5 {
        font-size: 1rem;
    }
    
    /* Form Fields Mobile */
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .row-fields {
        grid-template-columns: 1fr !important;
    }
    
    /* Passenger Rows Mobile */
    .passenger-row .card-body .row {
        margin: 0;
    }
    
    .passenger-row .card-body .row > div {
        padding: 0.5rem 0;
    }
    
    /* Navigation Mobile */
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }
    
    /* Cards Mobile */
    .card-body {
        padding: 1rem !important;
    }
    
    /* Map Container Mobile */
    .map-container {
        height: 300px !important;
    }
    
    /* Timeline Mobile */
    .timeline-enhanced {
        padding-left: 1.5rem;
    }
    
    /* Buttons Mobile */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }
    
    /* Hero Mobile */
    .hero .container {
        grid-template-columns: 1fr !important;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Features Grid Mobile */
    .features-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Booking Table Mobile */
    .bookings-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .bookings-table {
        min-width: 800px;
        font-size: 0.875rem;
    }
    
    .bookings-table th,
    .bookings-table td {
        padding: 0.5rem;
    }
    
    /* Modal Mobile */
    .modal-content {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    /* Review Grid Mobile */
    .review-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Contact Info Mobile */
    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Seat Legend Mobile */
    .seat-legend {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}

/* Tablet Responsive (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .seat-map {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch Target Sizes for Mobile */
@media (max-width: 768px) {
    /* Ensure minimum touch target size of 44x44px */
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1rem;
    }
    
    .seat {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Larger tap targets */
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .material-icons {
        font-size: 1.5rem !important;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Stack elements vertically on mobile */
    .d-flex.gap-2,
    .d-flex.gap-3 {
        flex-direction: column;
    }
    
    .d-flex.gap-2 .btn,
    .d-flex.gap-3 .btn {
        width: 100%;
    }
}

/* Material Icons Sizing */
.material-icons {
    vertical-align: middle;
}

/* Hero Section */
.min-vh-50 {
    min-height: 60vh;
}

/* Backdrop Blur Effect */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

