/**
 * Transportation Booking - Frontend Styles
 * Beautiful multi-step form design
 */

:root {
    --tb-red: #E53E3E;
    --tb-red-dark: #C53030;
    --tb-red-light: #FED7D7;
    --tb-red-bg: #FFF5F5;
    --tb-blue: #1A365D;
    --tb-blue-dark: #2D3748;
    --tb-blue-light: #E2E8F0;
    --tb-gray-50: #F7FAFC;
    --tb-gray-100: #EDF2F7;
    --tb-gray-200: #E2E8F0;
    --tb-gray-300: #CBD5E0;
    --tb-gray-500: #718096;
    --tb-gray-600: #4A5568;
    --tb-gray-700: #2D3748;
    --tb-gray-900: #1A202C;
    --tb-white: #ffffff;
}

/* Container */
.tb-booking-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.tb-booking-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Form Section */
.tb-booking-form-section {
    background: var(--tb-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header */
.tb-booking-header {
    margin-bottom: 40px;
}

.tb-booking-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tb-red-bg);
    color: var(--tb-red);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.tb-booking-tag .tb-icon {
    color: var(--tb-red);
}

.tb-booking-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--tb-red);
    margin: 0 0 16px 0;
    line-height: 1.2;
}

.tb-booking-description {
    font-size: 16px;
    color: var(--tb-gray-600);
    line-height: 1.6;
    margin: 0;
}

/* Progress Indicator */
.tb-progress-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px 0;
}

.tb-progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.tb-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tb-gray-200);
    color: var(--tb-gray-500);
    flex-shrink: 0;
    position: relative;
}

.tb-progress-step .tb-check-icon {
    display: none;
}

.tb-progress-step .tb-lock-icon {
    display: block;
}

.tb-progress-step.tb-active .tb-step-icon,
.tb-progress-step.tb-completed .tb-step-icon {
    background: var(--tb-red);
    color: var(--tb-white);
}

.tb-progress-step.tb-completed .tb-check-icon {
    display: block;
}

.tb-progress-step.tb-completed .tb-lock-icon {
    display: none;
}

.tb-progress-step.tb-active .tb-lock-icon {
    display: none;
}

.tb-progress-step.tb-active .tb-check-icon {
    display: block;
}

.tb-step-content {
    flex: 1;
}

.tb-step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--tb-gray-500);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.tb-step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--tb-blue);
    line-height: 1.3;
}

.tb-progress-line {
    flex: 0 0 40px;
    height: 2px;
    background: var(--tb-gray-200);
    position: relative;
}

.tb-progress-step.tb-completed ~ .tb-progress-line {
    background: var(--tb-red);
}

/* Form Card */
.tb-form-card {
    background: var(--tb-white);
    border: 1px solid var(--tb-gray-200);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 24px;
}

.tb-form-heading {
    font-size: 20px;
    font-weight: 600;
    color: var(--tb-gray-700);
    margin: 0 0 24px 0;
}

/* Form Groups */
.tb-form-group {
    margin-bottom: 20px;
}

.tb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tb-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--tb-gray-700);
    margin-bottom: 8px;
}

.tb-form-group input[type="text"],
.tb-form-group input[type="email"],
.tb-form-group input[type="tel"],
.tb-form-group input[type="date"],
.tb-form-group input[type="time"],
.tb-form-group select,
.tb-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--tb-gray-300);
    border-radius: 6px;
    transition: all 0.2s;
    background: var(--tb-white);
    color: var(--tb-gray-900);
}

.tb-form-group input:focus,
.tb-form-group select:focus,
.tb-form-group textarea:focus {
    outline: none;
    border-color: var(--tb-red);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.tb-form-help {
    font-size: 13px;
    color: var(--tb-gray-500);
    margin: 8px 0 0 0;
}

/* Toggle Switch */
.tb-toggle-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 8px;
}

.tb-toggle-label span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--tb-gray-700);
}

.tb-toggle-wrapper {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

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

.tb-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--tb-gray-300);
    transition: .4s;
    border-radius: 34px;
}

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

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

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

/* Checkbox */
.tb-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.tb-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
}

.tb-checkbox-label span {
    font-size: 14px;
    color: var(--tb-gray-700);
    line-height: 1.5;
}

/* Pricing Display */
.tb-pricing-display {
    background: var(--tb-gray-50);
    border: 2px solid var(--tb-gray-200);
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
}

.tb-pricing-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tb-gray-200);
}

.tb-pricing-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tb-pricing-label {
    font-size: 13px;
    color: var(--tb-gray-600);
    font-weight: 500;
}

.tb-pricing-value {
    font-size: 16px;
    color: var(--tb-gray-900);
    font-weight: 600;
}

.tb-pricing-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tb-pricing-total .tb-pricing-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--tb-gray-700);
}

.tb-pricing-amount {
    font-size: 32px;
    font-weight: bold;
    color: var(--tb-red);
}

/* Review Section */
.tb-review-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--tb-gray-200);
}

.tb-review-section:last-of-type {
    border-bottom: none;
}

.tb-review-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tb-blue);
    margin: 0 0 16px 0;
}

.tb-review-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tb-review-label {
    font-size: 14px;
    color: var(--tb-gray-600);
    font-weight: 500;
}

.tb-review-value {
    font-size: 14px;
    color: var(--tb-gray-900);
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}

.tb-review-price {
    font-size: 20px;
    color: var(--tb-red);
}

/* Buttons */
.tb-btn {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.tb-btn-primary:hover {
    background: var(--tb-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.tb-btn-secondary {
    background: var(--tb-gray-100);
    color: var(--tb-gray-700);
}

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

.tb-btn-group {
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.tb-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Steps */
.tb-form-step {
    display: none;
}

.tb-form-step.tb-active {
    display: block !important;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Message */
.tb-success-message {
    text-align: center;
    padding: 60px 40px;
}

.tb-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--tb-red);
    color: var(--tb-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 24px;
}

.tb-success-message h3 {
    font-size: 28px;
    color: var(--tb-blue);
    margin: 0 0 16px 0;
}

.tb-success-message p {
    font-size: 16px;
    color: var(--tb-gray-600);
    margin: 8px 0;
}

.tb-booking-ref {
    background: var(--tb-red-bg);
    padding: 16px;
    border-radius: 8px;
    margin-top: 24px;
}

.tb-booking-ref strong {
    color: var(--tb-red);
    font-size: 20px;
}

/* Benefits Sidebar */
.tb-benefits-sidebar {
    background: var(--tb-gray-50);
    padding: 32px;
    border-radius: 12px;
    position: sticky;
    top: 20px;
}

.tb-benefits-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--tb-blue);
    margin: 0 0 8px 0;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--tb-red);
}

.tb-benefit-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--tb-gray-200);
}

.tb-benefit-item:last-of-type {
    border-bottom: none;
}

.tb-benefit-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--tb-red-bg);
    color: var(--tb-red);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tb-benefit-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--tb-gray-900);
    margin: 0 0 4px 0;
}

.tb-benefit-content p {
    font-size: 14px;
    color: var(--tb-gray-600);
    margin: 0;
    line-height: 1.5;
}

/* Contact Box */
.tb-contact-box {
    background: var(--tb-blue);
    color: var(--tb-white);
    padding: 24px;
    border-radius: 8px;
    margin-top: 24px;
    text-align: center;
}

.tb-contact-label {
    font-size: 14px;
    color: var(--tb-blue-light);
    margin: 0 0 8px 0;
}

.tb-contact-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 8px 0;
}

.tb-contact-phone svg {
    width: 24px;
    height: 24px;
    stroke: var(--tb-white);
}

.tb-contact-text {
    font-size: 13px;
    color: var(--tb-blue-light);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tb-booking-wrapper {
        grid-template-columns: 1fr;
    }
    
    .tb-benefits-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .tb-booking-container {
        padding: 0 16px;
        margin: 20px auto;
    }
    
    .tb-booking-form-section {
        padding: 24px;
    }
    
    .tb-booking-title {
        font-size: 28px;
    }
    
    .tb-progress-indicator {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .tb-progress-step {
        flex-basis: 100%;
    }
    
    .tb-progress-line {
        display: none;
    }
    
    .tb-form-row {
        grid-template-columns: 1fr;
    }
    
    .tb-btn-group {
        flex-direction: column;
    }
    
    .tb-btn {
        width: 100%;
    }
    
    .tb-pricing-info {
        grid-template-columns: 1fr;
    }
    
    .tb-benefits-sidebar {
        padding: 24px;
    }
}

/* Loading State */
.tb-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.tb-loading:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid var(--tb-red);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Customer Portal Styles */
.tb-portal-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.tb-portal-card {
    background: var(--tb-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 500px;
    margin: 0 auto;
}

.tb-portal-header {
    text-align: center;
    margin-bottom: 30px;
}

.tb-portal-header h2 {
    font-size: 28px;
    color: var(--tb-blue);
    margin: 0 0 8px 0;
}

.tb-portal-header p {
    font-size: 15px;
    color: var(--tb-gray-600);
    margin: 0;
}

.tb-portal-form .tb-form-group {
    margin-bottom: 20px;
}

.tb-portal-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--tb-gray-700);
    margin-bottom: 8px;
}

.tb-portal-form input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--tb-gray-300);
    border-radius: 6px;
    transition: all 0.2s;
}

.tb-portal-form input:focus {
    outline: none;
    border-color: var(--tb-red);
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.tb-btn-block {
    width: 100%;
}

.tb-form-footer {
    text-align: center;
    margin-top: 20px;
}

.tb-form-footer a {
    color: var(--tb-red);
    text-decoration: none;
    font-size: 14px;
}

.tb-form-footer a:hover {
    text-decoration: underline;
}

/* Portal Header Bar */
.tb-portal-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--tb-white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.tb-portal-header-bar h2 {
    font-size: 24px;
    color: var(--tb-blue);
    margin: 0 0 4px 0;
}

.tb-portal-header-bar p {
    font-size: 14px;
    color: var(--tb-gray-600);
    margin: 0;
}

/* Portal Filters */
.tb-portal-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.tb-filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--tb-white);
    color: var(--tb-gray-700);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--tb-gray-300);
    transition: all 0.2s;
}

.tb-filter-btn:hover {
    border-color: var(--tb-red);
    color: var(--tb-red);
}

.tb-filter-btn.active {
    background: var(--tb-red);
    color: var(--tb-white);
    border-color: var(--tb-red);
}

/* Bookings List */
.tb-bookings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tb-booking-card {
    background: var(--tb-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tb-booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: var(--tb-gray-50);
    border-bottom: 1px solid var(--tb-gray-200);
}

.tb-booking-card-header h3 {
    font-size: 18px;
    color: var(--tb-blue);
    margin: 0 0 4px 0;
}

.tb-booking-date {
    font-size: 14px;
    color: var(--tb-gray-600);
    margin: 0;
}

.tb-booking-card-body {
    padding: 24px;
}

/* Booking Route */
.tb-booking-route {
    margin-bottom: 24px;
}

.tb-route-point {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tb-route-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tb-route-pickup {
    background: #C6F6D5;
    color: #2F855A;
}

.tb-route-dropoff {
    background: #BEE3F8;
    color: #2C5282;
}

.tb-route-details {
    flex: 1;
}

.tb-route-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--tb-gray-600);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tb-route-address {
    display: block;
    font-size: 14px;
    color: var(--tb-gray-900);
    font-weight: 500;
}

.tb-route-line {
    width: 2px;
    height: 30px;
    background: var(--tb-gray-300);
    margin-left: 15px;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Booking Info */
.tb-booking-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--tb-gray-200);
}

.tb-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tb-info-label {
    font-size: 12px;
    color: var(--tb-gray-600);
    font-weight: 500;
}

.tb-info-value {
    font-size: 14px;
    color: var(--tb-gray-900);
    font-weight: 600;
}

.tb-info-value.tb-price {
    color: var(--tb-red);
    font-size: 18px;
}

/* Booking Card Footer */
.tb-booking-card-footer {
    padding: 16px 24px;
    background: var(--tb-gray-50);
    border-top: 1px solid var(--tb-gray-200);
}

.tb-btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.tb-btn-danger {
    background: var(--tb-white);
    color: var(--tb-red);
    border: 1px solid var(--tb-red);
}

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

/* Empty State */
.tb-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--tb-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tb-empty-state svg {
    color: var(--tb-gray-300);
    margin-bottom: 20px;
}

.tb-empty-state h3 {
    font-size: 20px;
    color: var(--tb-gray-700);
    margin: 0 0 8px 0;
}

.tb-empty-state p {
    font-size: 14px;
    color: var(--tb-gray-600);
    margin: 0;
}

/* Responsive - Portal */
@media (max-width: 768px) {
    .tb-portal-card {
        padding: 24px;
    }
    
    .tb-portal-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .tb-booking-info {
        grid-template-columns: 1fr;
    }
}

/* Google Places Autocomplete Dropdown Styling */
.pac-container {
    background-color: #ffffff !important;
    border: 1px solid #05588e1f !important;
    border-radius: 8px !important;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15) !important;
    margin-top: 4px !important;
    font-family: "Poppins", sans-serif !important;
    z-index: 9999 !important;
    padding: 8px 0 !important;
}

.pac-item {
    padding: 12px 16px !important;
    cursor: pointer !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 14px !important;
    color: #262626 !important;
    transition: background-color 0.2s ease !important;
}

.pac-item:last-child {
    border-bottom: none !important;
}

.pac-item:hover {
    background-color: #f7f8fa !important;
}

.pac-item-selected {
    background-color: #f7f8fa !important;
}

.pac-item-query {
    font-size: 14px !important;
    color: #262626 !important;
    font-weight: 500 !important;
    padding-right: 8px !important;
}

.pac-matched {
    font-weight: 600 !important;
    color: #002665 !important;
}

.pac-icon {
    margin-right: 8px !important;
    width: 15px !important;
    height: 20px !important;
}

/* Hide "Powered by Google" text and logo */
.pac-container::after {
    display: none !important;
}

.pac-logo:after {
    display: none !important;
    content: none !important;
}

.pac-container .pac-logo {
    display: none !important;
}

/* Remove any Google branding */
.pac-container [class*="pac-logo"],
.pac-container [class*="powered"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

