/* ========================================
   BOOKING PAGE ENHANCEMENTS
   Multi-step form with progress tracking
   ======================================== */

/* Progress Bar Container */
.progress-container {
    position: relative;
    background: var(--progress-card-bg, #1a1a1a);
    padding: 22px 20px 18px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--progress-border, rgba(255,255,255,0.06));
    box-shadow: var(--progress-shadow, 0 6px 18px rgba(15,15,15,0.25));
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 8px;
    padding: 10px 8px 22px 8px;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 12px;
    right: 12px;
    height: 6px;
    border-radius: 999px;
    background: var(--progress-line-bg, #444);
    z-index: 0;
    transform: translateY(-50%);
}

.progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--progress-fill-start, #ff6347), var(--progress-fill-end, #ff4500));
    width: 0%;
    transition: width 0.45s cubic-bezier(.2,.9,.2,1);
    border-radius: inherit;
    box-shadow: 0 4px 14px rgba(255,99,71,0.12);
}

/* Step Indicators */
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    min-width: 60px;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--step-bg, #2a2a2a);
    border: 3px solid var(--step-border, #3a3a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--step-number-color, #fff);
    font-weight: 700;
    transition: all 0.24s ease;
    position: relative;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.step.active .step-circle {
    background: linear-gradient(135deg, var(--progress-fill-start, #ff6347), var(--progress-fill-end, #ff4500));
    border-color: transparent;
    box-shadow: 0 8px 26px rgba(255,99,71,0.2);
    transform: translateY(-6px);
}

.step.completed .step-circle {
    background: var(--step-completed-bg, #4CAF50);
    border-color: var(--step-completed-bg, #4CAF50);
    box-shadow: 0 8px 26px rgba(76,175,80,0.12);
}

/* Smooth transition from number -> check */
.step-circle {
    overflow: hidden; /* keep scaled content clipped */
}

.step-circle i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
    color: #fff;
    font-size: 14px;
    transition: transform 0.28s ease, opacity 0.28s ease;
    pointer-events: none;
}

.step.completed .step-circle i {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.step-number {
    font-size: 0.95rem;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.step.completed .step-number {
    opacity: 0;
    transform: scale(0.6);
}

.step.active .step-number {
    color: var(--step-number-color, #fff);
    transform: scale(1.05);
}

.step-label {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--step-label, #a8a8a8);
    font-weight: 600;
    text-align: center;
    min-width: 72px;
}

.step.active .step-label {
    color: var(--progress-accent, #ff6347);
}

.step.completed .step-label {
    color: var(--step-completed-label, #4CAF50);
}

@media (max-width: 640px) {
    .progress-steps { gap: 12px; padding-bottom: 28px; }
    .step-label { font-size: 0.75rem; min-width: 56px; }
    .step-circle { width: 38px; height: 38px; }
    .progress-line { left: 8px; right: 8px; }

}

@media (max-width: 640px) {
    .progress-steps { gap: 12px; padding-bottom: 28px; }
    .step-label { font-size: 0.75rem; min-width: 56px; }
    .step-circle { width: 38px; height: 38px; }
    .progress-line { left: 8px; right: 8px; }
}

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

.form-step.active {
    display: block;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #444;
}

.step-header h3 {
    color: #ff6347;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.step-header p {
    color: #999;
    font-size: 0.9rem;
}

/* Validation Icons */
.validation-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    display: none;
}

.validation-icon.success {
    color: #4CAF50;
    display: block;
    animation: checkmark 0.5s ease;
}

.validation-icon.error {
    color: #ff3860;
    display: block;
}

@keyframes checkmark {
    0% {
        transform: translateY(-50%) scale(0);
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
    100% {
        transform: translateY(-50%) scale(1);
    }
}

.form-group.valid input,
.form-group.valid select {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Character Counter */
.character-counter {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
    margin-top: 5px;
}

.character-counter.warning {
    color: #ffa500;
}

.character-counter.danger {
    color: #ff3860;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}

.nav-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-prev {
    background: #444;
    color: white;
}

.btn-prev:hover {
    background: #555;
    transform: translateX(-3px);
}

.btn-next {
    background: linear-gradient(135deg, #ff6347, #ff4500);
    color: white;
}

.btn-next:hover {
    transform: translateX(3px);
    box-shadow: 0 5px 15px rgba(255, 99, 71, 0.4);
}

.btn-prev:disabled,
.btn-next:disabled {
    background: #333;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Booking Summary Sidebar */
.booking-summary {
    background: #2b2b2b;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #444;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #444;
}

.summary-header h3 {
    color: #ff6347;
    font-size: 1.3rem;
}

.summary-section {
    margin-bottom: 20px;
}

.summary-section h4 {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

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

.summary-label {
    color: #999;
    font-size: 0.9rem;
}

.summary-value {
    color: white;
    font-weight: 500;
    text-align: right;
}

.summary-value.empty {
    color: #666;
    font-style: italic;
}

/* Price Calculator */
.price-calculator {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.price-calculator h4 {
    color: #ff6347;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-breakdown {
    margin-bottom: 15px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #ccc;
    font-size: 0.9rem;
}

.price-item.total {
    border-top: 2px solid #444;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ff6347;
}

/* Price Slider */
.price-slider-group {
    margin: 15px 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 0.85rem;
}

.price-slider {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #444;
    outline: none;
    -webkit-appearance: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff6347;
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 99, 71, 0.5);
}

.price-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ff6347;
    cursor: pointer;
    border: none;
}

/* Discount Badge */
.discount-badge {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Summary Actions */
.summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.summary-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download {
    background: #444;
    color: white;
}

.btn-download:hover {
    background: #555;
}

.btn-print {
    background: transparent;
    color: #ff6347;
    border: 2px solid #ff6347;
}

.btn-print:hover {
    background: #ff6347;
    color: white;
}

/* Delivery Estimate */
.delivery-estimate {
    background: #333;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
}

.delivery-estimate .label {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.delivery-estimate .date {
    color: #4CAF50;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Success Modal Enhanced */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 20px;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6347;
    animation: confettiFall 3s linear;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.success-animation {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 5;
    stroke: #4CAF50;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #4CAF50;
    stroke-width: 5;
    fill: none;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.booking-reference {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border: 2px dashed #ff6347;
}

.booking-reference .label {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.booking-reference .ref-number {
    color: #ff6347;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    animation: typeWriter 1s steps(12);
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
}

@keyframes typeWriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes modalZoom {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .booking-summary {
        position: static;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .progress-container {
        padding: 20px 15px;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .form-navigation {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

    .price-calculator {
        padding: 15px;
    }

    .booking-reference .ref-number {
        font-size: 1.2rem;
    }
}

/* ============================================
   WEATHER FORECAST STYLES
   ============================================ */

.weather-section {
    background: #2b2b2b;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #444;
    margin-top: 20px;
}

.weather-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #ff6347;
}

.weather-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.weather-card {
    background: linear-gradient(145deg, #1a1a1a, #222);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #444;
    transition: all 0.3s ease;
}

.weather-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 99, 71, 0.2);
}

.weather-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.weather-location {
    font-size: 0.9rem;
    color: #999;
}

.weather-icon {
    font-size: 2.5rem;
}

.weather-temp {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.weather-desc {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.weather-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 0.85rem;
}

.weather-detail i {
    color: #ff6347;
}

.weather-loading {
    text-align: center;
    padding: 30px;
    color: #999;
}

.weather-error {
    text-align: center;
    padding: 20px;
    color: #ff6347;
    background: rgba(255, 99, 71, 0.1);
    border-radius: 10px;
}

/* ============================================
   ROUTE OPTIMIZATION STYLES
   ============================================ */

.waypoints-section {
    background: #2b2b2b;
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #444;
    margin-bottom: 20px;
}

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

.waypoints-header h4 {
    color: #ff6347;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-waypoint-btn {
    background: linear-gradient(135deg, #ff6347, #ff4500);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.add-waypoint-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 99, 71, 0.4);
}

.waypoints-section{
    margin-top:10px;
}
.waypoints-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.waypoint-item {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.waypoint-item:hover {
    border-color: #ff6347;
}

/* Popular Routes */
.popular-routes {
    margin-bottom: 20px;
}
.popular-routes .pr-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffd9c8;
    font-size: 1rem;
    margin-bottom: 10px;
}
.pr-header .pr-icon {
    color: #ff6347;
    font-size: 1rem;
}
.pr-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.route-item {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(145deg, #1a1a1a, #242424);
    border: 1px solid #3a3a3a;
    padding: 12px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    width: 100%;
    text-align: left;
    color: inherit;
}
.route-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 99, 71, 0.15);
}
.route-item:focus {
    outline: 3px solid rgba(255, 99, 71, 0.12);
}
.route-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}
.route-cities {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.98rem;
    color: white;
}
.route-arrow {
    color: #ff6347;
    margin: 0 6px;
}
.route-meta {
    color: #bbb;
    font-size: 0.85rem;
}
.route-distance strong {
    color: white;
}
.route-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge i {
    font-size: 0.85rem;
}
.badge.high {
    background: linear-gradient(90deg, #ff7a59, #ff6347);
    color: white;
    box-shadow: 0 6px 18px rgba(255, 99, 71, 0.12);
}
.badge.trending {
    background: rgba(255, 255, 255, 0.03);
    color: #ffd6b8;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

@media (max-width: 768px) {
    .route-cities { font-size: 0.95rem; }
    .route-meta { font-size: 0.8rem; }
    .popular-routes .pr-header { font-size: 0.95rem; }
    .route-item { padding: 10px; }
}

.waypoint-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #ff6347;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.waypoint-input {
    flex: 1;
}

.waypoint-input input {
    width: 100%;
    background: #2b2b2b;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 8px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.waypoint-input input:focus {
    outline: none;
    border-color: #ff6347;
}

.waypoint-actions {
    display: flex;
    gap: 8px;
}

.waypoint-action-btn {
    background: #444;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.waypoint-action-btn:hover {
    background: #ff6347;
}

.waypoint-action-btn.delete:hover {
    background: #dc3545;
}

.optimize-route-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease;
}

.optimize-route-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.optimization-result {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
}

.optimization-result.show {
    display: block;
}

.optimization-result h5 {
    color: #4CAF50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.optimization-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    color: #ccc;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN - WEATHER & WAYPOINTS
   ============================================ */

@media (max-width: 768px) {
    .weather-grid {
        grid-template-columns: 1fr;
    }

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

    .waypoints-header {
        flex-direction: column;
        gap: 15px;
    }

    .add-waypoint-btn {
        width: 100%;
        justify-content: center;
    }
}
