/* =============================================================================
   TAKA TRAVEL - FRONTEND CSS v5.0
   - Gading Rent Car Design
   - Jost Font
   - Custom Design System
   ============================================================================= */

/* =============================================================================
   0. GOOGLE FONTS - JOST
   ============================================================================= */

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

/* =============================================================================
   1. RESET & BASE
   ============================================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: #E5E7EB;
}

/* =============================================================================
   2. CONTAINER
   ============================================================================= */

.taka-rental-container {
    max-width: 650px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1f2937;
}

/* =============================================================================
   3. HEADER - BLACK WITH CENTERED LOGO
   ============================================================================= */

.taka-header {
    background: #1a1a1a;
    padding: 30px 20px;
    text-align: center;
}

.taka-logo {
    margin: 0;
}

.taka-logo img {
    max-width: 220px;
    height: auto;
    display: inline-block;
}

.taka-title {
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    margin: 30px 0 25px 0;
    text-align: center;
    padding: 0 30px;
    font-family: 'Jost', sans-serif;
}

/* =============================================================================
   4. STEPS
   ============================================================================= */

.taka-step {
    display: none;
    padding: 30px;
}

.taka-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

/* =============================================================================
   5. FORM ELEMENTS BASE
   ============================================================================= */

.taka-form-group {
    margin-bottom: 18px;
}

.taka-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 10px;
    font-family: 'Jost', sans-serif;
}

.taka-sublabel {
    display: block;
    font-size: 13px;
    font-weight: 400;
    color: #C4A053;
    margin-bottom: 8px;
    margin-top: 5px;
    font-family: 'Jost', sans-serif;
}

.taka-hint {
    font-size: 12px;
    color: #C4A053;
    margin-top: 6px;
    margin-bottom: 0;
    font-style: normal;
    font-family: 'Jost', sans-serif;
    line-height: 1.5;
}

.taka-info-text {
    font-size: 14px;
    color: #6b7280;
    margin-top: 15px;
    text-align: center;
    font-family: 'Jost', sans-serif;
}

.taka-info-text strong {
    color: #1f2937;
    font-weight: 600;
}

/* =============================================================================
   6. INPUT & SELECT
   ============================================================================= */

.taka-input,
.taka-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Jost', sans-serif;
}

.taka-input:focus,
.taka-select:focus {
    outline: none;
    border-color: #C4A053;
    box-shadow: 0 0 0 3px rgba(196, 160, 83, 0.1);
}

.taka-input::placeholder {
    color: #9ca3af;
    font-style: normal;
}

.taka-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.taka-select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.7;
}

/* =============================================================================
   7. STEP 1 - CITY SELECTION
   ============================================================================= */

#city-search {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Jost', sans-serif;
}

#city-search:focus {
    outline: none;
    border-color: #C4A053;
    box-shadow: 0 0 0 3px rgba(196, 160, 83, 0.1);
}

#city-search::placeholder {
    color: #9ca3af;
    font-style: normal;
}

/* Dropdown Search Results */
#city-dropdown {
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.taka-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #1f2937;
    transition: background-color 0.2s, color 0.2s;
    font-family: 'Jost', sans-serif;
}

.taka-dropdown-item:last-child {
    border-bottom: none;
}

.taka-dropdown-item:hover {
    background: #FEF9F0;
    color: #1f2937;
    border-left: 3px solid #C4A053;
}

/* Favorites */
.taka-favorites {
    margin-top: 25px;
}

.taka-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 0;
    border-bottom: none;
    font-family: 'Jost', sans-serif;
}

.taka-section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    font-family: 'Jost', sans-serif;
}

/* Two Column Cities Layout */
.taka-two-column-cities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.taka-city-column {
    padding: 20px;
    background: #FEFBF5;
    border-radius: 8px;
    border: 1px solid #F5EFE0;
}

.taka-column-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #C4A053;
    font-family: 'Jost', sans-serif;
}

/* Selected City Display */
.taka-selected-city-display {
    background: #C4A053;
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.taka-selected-city-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.taka-selected-city-label {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}

.taka-selected-city-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.taka-change-city-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Jost', sans-serif;
}

.taka-change-city-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Large Button */
.taka-btn-large {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
}

.taka-city-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.taka-city-item {
    padding: 12px 16px;
    background: #FEF9F0;
    border: 1px solid #F5EFE0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.2s;
    font-family: 'Jost', sans-serif;
    text-align: center;
}

.taka-city-item:hover {
    background: #F5EFE0;
    border-color: #C4A053;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(196, 160, 83, 0.15);
}

/* City Section (for combined Step 1) */
.taka-city-section {
    margin-bottom: 25px;
}

/* Selected Origin City Badge */
.taka-selected-badge {
    display: inline-block;
    background: #C4A053;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Jost', sans-serif;
    box-shadow: 0 2px 6px rgba(196, 160, 83, 0.2);
}

/* Favorites Title */
.taka-favorites-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    font-family: 'Jost', sans-serif;
}

/* Dropdown styling for origin and destination */
.taka-dropdown {
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

/* =============================================================================
   8. STEP 4 - RESULT PAGE
   ============================================================================= */

/* Header */
.taka-result-header {
    text-align: left;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.taka-result-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px 0;
    font-family: 'Jost', sans-serif;
}

.taka-result-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    font-family: 'Jost', sans-serif;
}

/* Package Selection */
.taka-package-selection {
    margin-bottom: 25px;
}

.taka-packages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.taka-package-radio-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.taka-package-radio-wrapper:hover {
    border-color: #C4A053;
    background: #FEFBF5;
}

.taka-package-radio-wrapper:has(.taka-package-radio:checked) {
    background: #FEF9F0;
    border-color: #C4A053;
    box-shadow: 0 2px 6px rgba(196, 160, 83, 0.12);
}

.taka-package-radio {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #C4A053;
}

.taka-package-label {
    flex: 1;
    cursor: pointer;
}

.taka-package-name {
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    margin: 0;
    font-family: 'Jost', sans-serif;
}

.taka-package-badge-inline {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    background: #fbbf24;
    color: #000;
    border-radius: 3px;
    line-height: 1.4;
    font-family: 'Jost', sans-serif;
}

.taka-package-desc-small {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.4;
    font-family: 'Jost', sans-serif;
}

/* Driver Info */
.taka-driver-info {
    margin-top: 20px;
}

.taka-driver-info .taka-info-text {
    margin: 0;
    text-align: left;
    font-size: 14px;
}

/* Package Features (Included/Excluded) */
.taka-package-features {
    margin-top: 25px;
    margin-bottom: 25px;
    padding: 18px;
    background: #FEF9F0;
    border-radius: 6px;
    border: 1px solid #F5EFE0;
}

.taka-feature-section {
    margin-bottom: 15px;
}

.taka-feature-section:last-child {
    margin-bottom: 0;
}

.taka-feature-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-family: 'Jost', sans-serif;
}

.taka-feature-list {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    font-family: 'Jost', sans-serif;
}

/* Discount Success Message */
.taka-discount-message {
    font-size: 14px;
    color: #16a34a;
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 0;
    font-family: 'Jost', sans-serif;
}

/* Price Breakdown */
.taka-breakdown {
    margin-top: 25px;
    margin-bottom: 25px;
}

.taka-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-family: 'Jost', sans-serif;
}

.taka-breakdown-row:first-child {
    border-top: 1px solid #e5e7eb;
}

.taka-breakdown-row span:first-child {
    color: #1f2937;
}

.taka-breakdown-row span:last-child {
    font-weight: 600;
    color: #1f2937;
}

/* Total Price */
.taka-total-price {
    padding: 0;
    margin-bottom: 20px;
    border-bottom: none;
}

.taka-total-label {
    font-size: 16px;
    color: #1f2937;
    margin: 0 0 12px 0;
    font-weight: 600;
    font-family: 'Jost', sans-serif;
}

.taka-original-price {
    font-size: 20px;
    color: #9ca3af;
    text-decoration: line-through;
    margin: 0 0 4px 0;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    opacity: 0.8;
}

.taka-final-price {
    font-size: 36px;
    font-weight: 700;
    color: #10b981;
    margin: 0 0 8px 0;
    font-family: 'Jost', sans-serif;
    line-height: 1.2;
}

.taka-discount-message {
    font-size: 14px;
    color: #059669;
    font-weight: 600;
    margin: 8px 0 0 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 8px;
    border-left: 4px solid #10b981;
    font-family: 'Jost', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.taka-savings-amount {
    font-size: 15px;
    color: #059669;
    font-weight: 600;
    margin: 4px 0 8px 0;
    font-family: 'Jost', sans-serif;
}

.taka-discount-row {
    background: #ecfdf5;
    border-left: 3px solid #10b981;
    padding: 12px 16px !important;
    margin: 8px 0;
    border-radius: 6px;
}

.taka-total-amount {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    font-family: 'Jost', sans-serif;
    line-height: 1.2;
}

/* =============================================================================
   9. BUTTONS
   ============================================================================= */

.taka-btn {
    padding: 13px 32px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-family: 'Jost', sans-serif;
    min-width: 120px;
}

.taka-btn-primary {
    background: #C4A053;
    color: white;
}

.taka-btn-primary:hover {
    background: #B39048;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 160, 83, 0.3);
}

.taka-btn-secondary {
    background: #6B7280;
    color: white;
}

.taka-btn-secondary:hover {
    background: #5B6270;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

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

.taka-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.taka-action-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
}

.taka-action-buttons .taka-btn {
    flex: 0 0 auto;
}

.taka-action-buttons .taka-btn-primary {
    margin-left: auto;
}

/* =============================================================================
   10. MODAL - CENTERED & FIXED
   ============================================================================= */

.taka-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.taka-modal-content {
    background: white;
    padding: 30px;
    border-radius: 4px;
    max-width: 480px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    margin: 0 auto; /* TAMBAHAN - Center horizontal */
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.taka-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}

.taka-modal-close:hover {
    color: #1f2937;
}

.taka-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 25px 0;
    font-family: 'Jost', sans-serif;
}

/* Modal Form */
#booking-form .taka-form-group {
    margin-bottom: 20px;
}

#booking-form .taka-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
    font-family: 'Jost', sans-serif;
}

#booking-form .taka-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: 'Jost', sans-serif;
}

#booking-form .taka-input:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

#booking-form .taka-btn-primary {
    margin-top: 10px;
}

/* =============================================================================
   11. LOADING
   ============================================================================= */

.taka-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.taka-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e3a5f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================================================
   12. SCROLLBAR
   ============================================================================= */

#city-dropdown::-webkit-scrollbar,
.taka-modal-content::-webkit-scrollbar {
    width: 8px;
}

#city-dropdown::-webkit-scrollbar-track,
.taka-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#city-dropdown::-webkit-scrollbar-thumb,
.taka-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#city-dropdown::-webkit-scrollbar-thumb:hover,
.taka-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* =============================================================================
   13. RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    .taka-rental-container {
        margin: 20px 10px;
    }

    .taka-step {
        padding: 25px;
    }

    .taka-city-list {
        grid-template-columns: 1fr;
    }

    .taka-total-amount {
        font-size: 28px;
    }

    .taka-modal-content {
        padding: 25px 20px;
        max-width: 90%;
    }

    .taka-package-features {
        padding: 15px;
    }

    .taka-action-buttons {
        flex-direction: column;
    }

    .taka-action-buttons .taka-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .taka-rental-container {
        margin: 10px 5px;
    }

    .taka-step {
        padding: 20px;
    }

    .taka-logo img {
        max-width: 100px;
    }

    .taka-title {
        font-size: 22px;
        padding: 0 20px;
    }

    .taka-result-title {
        font-size: 18px;
    }

    .taka-total-amount {
        font-size: 26px;
    }

    .taka-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .taka-modal-content {
        padding: 20px 15px;
        max-width: 95%;
    }

    .taka-package-features {
        padding: 14px;
    }

    .taka-feature-title,
    .taka-feature-list {
        font-size: 13px;
    }

    .taka-city-item {
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* =============================================================================
   14. DURATION STEP - ENHANCED DESIGN
   ============================================================================= */

/* Route Summary Card */
.taka-route-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.taka-route-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.taka-route-icon {
    flex-shrink: 0;
}

.taka-route-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.taka-route-origin,
.taka-route-destination {
    font-size: 18px;
    font-weight: 600;
    padding: 8px 0;
}

.taka-route-origin {
    color: rgba(255, 255, 255, 0.95);
}

.taka-route-destination {
    color: #fff;
}

.taka-arrow-icon {
    opacity: 0.7;
    align-self: center;
}

/* Duration Input Wrapper */
.taka-duration-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.taka-duration-input {
    flex: 1;
    padding-right: 60px !important;
}

.taka-duration-unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #6b7280;
    font-size: 15px;
    pointer-events: none;
}

/* Info Box */
.taka-info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 12px;
    font-size: 14px;
    color: #1e40af;
}

.taka-info-icon {
    flex-shrink: 0;
    color: #3b82f6;
}

.taka-info-box strong {
    color: #1e3a8a;
    font-weight: 700;
}

/* Large Button */
.taka-btn-large {
    padding: 16px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-top: 10px;
}

/* Sublabel with Icon */
.taka-sublabel svg {
    margin-right: 5px;
}

/* =============================================================================
   15. UTILITIES
   ============================================================================= */

.taka-hidden {
    display: none !important;
}

/* =============================================================================
   END
   ============================================================================= */