/**
 * Payment & Success Page Styles
 */

/* ========================================
   PAYMENT PAGE
   ======================================== */

.chauffeur-payment-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.payment-header {
    text-align: center;
    margin-bottom: 40px;
}

.payment-header .journey-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    font-size: 16px;
    color: #333;
}

.payment-header .route-from,
.payment-header .route-to {
    font-weight: 500;
}

.payment-header .route-arrow {
    color: #960114;
    font-size: 20px;
    font-weight: bold;
}

.payment-header h1 {
    font-size: 32px !important;
    font-weight: 700 !important;
    margin: 0 0 10px 0 !important;
    color: #121212 !important;
    letter-spacing: 0.5px;
}

.payment-header p {
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #666 !important;
    margin: 0 !important;
}

.payment-content {
    display: block;
    max-width: 700px;
    margin: 40px auto 0;
}

/* ========================================
   JOURNEY SUMMARY BOX
   ======================================== */

.journey-summary-box {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.journey-summary-box h3 {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 0 16px 0 !important;
    color: #121212 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journey-summary-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #e8f4f8;
    border-radius: 8px;
}

.journey-car-image {
    flex-shrink: 0;
}

.journey-car-image img {
    width: 120px;
    height: auto;
    object-fit: contain;
}

.journey-summary-details {
    flex: 1;
}

.journey-summary-name {
    font-size: 15px;
    color: #121212;
    margin-bottom: 8px;
    line-height: 1.4;
}

.journey-summary-passenger {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.journey-summary-route {
    font-size: 14px;
    color: #666;
}

/* ========================================
   PAYMENT FORM
   ======================================== */

.payment-form-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.payment-form-section h2 {
    font-size: 22px !important;
    font-weight: 600 !important;
    margin: 0 0 24px 0 !important;
    color: #121212 !important;
}

.payment-error {
    text-align: center;
    padding: 40px 20px;
}

.payment-error svg {
    margin-bottom: 20px;
}

.payment-error h3 {
    font-size: 20px !important;
    font-weight: 600 !important;
    margin: 0 0 12px 0 !important;
    color: #f44336 !important;
}

.payment-error p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

#payment-form .form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#payment-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #121212;
    margin-bottom: 8px;
}

#payment-form input[type="text"],
#payment-form select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: #121212;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

#payment-form input:focus,
#payment-form select:focus {
    outline: none;
    border-color: #960114;
    box-shadow: 0 0 0 2px rgba(150, 1, 20, 0.1);
}

#payment-form select {
    cursor: pointer;
}

.payment-total-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    color: #121212;
}

.total-value {
    font-size: 16px;
    font-weight: 700;
    color: #121212;
}

.vat-text {
    font-size: 13px;
    font-weight: 400;
    color: #666;
}

.vat-row {
    text-align: right;
    margin-bottom: 8px;
}

.vat-label {
    font-size: 14px;
    color: #666;
}

.vat-text-small {
    font-size: 12px;
    text-transform: uppercase;
}

.grand-total-row {
    text-align: right;
    padding-top: 12px;
    border-top: 2px solid #ddd;
}

.grand-label {
    font-size: 18px;
    font-weight: 700;
    color: #960114;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin: 20px 0;
}

.secure-badge span {
    font-size: 14px;
    color: #121212;
    font-weight: 500;
}

.stripe-badge {
    margin-left: auto;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    padding: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.payment-card-icon {
    width: 50px;
    height: 36px;
    object-fit: contain;
    display: block;
    padding: 6px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.checkout-stripe-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}

.checkout-stripe-section h3 {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 0 20px 0 !important;
    color: #121212 !important;
}

.form-notice {
    background: #fff3cd;
    padding: 16px;
    border-radius: 6px;
    margin: 24px 0;
}

.form-notice p {
    font-size: 13px;
    color: #856404;
    margin: 0;
    line-height: 1.5;
}

.form-notice a {
    color: #856404;
    text-decoration: underline;
}

/* Stripe Card Element */
#card-element {
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    transition: border-color 0.2s;
}

#card-element.StripeElement--focus {
    border-color: #960114;
    box-shadow: 0 0 0 3px rgba(150, 1, 20, 0.1);
}

#card-errors {
    color: #f44336;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

#card-errors:not(:empty) {
    display: block;
}

/* Confirm Booking Button */
.btn-confirm-booking {
    width: 100%;
    padding: 18px 32px;
    background: #960114;
    color: white;
    border: none;
    border-radius: 32px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-confirm-booking:hover:not(:disabled) {
    background: #710010;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(150, 1, 20, 0.4);
}

.btn-confirm-booking:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-confirm-booking #payment-spinner {
    display: inline-block;
}

.btn-confirm-booking svg:not(.spinner) {
    margin-left: auto;
}

/* Back to Details Button */
.btn-back-to-details {
    width: 100%;
    padding: 16px 32px;
    background: white;
    color: #960114;
    border: 2px solid #960114;
    border-radius: 32px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-back-to-details:hover {
    background: #f0f7ff;
}

.btn-back-to-details svg {
    margin-right: auto;
}

.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner circle {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.secure-payment-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
}

/* ========================================
   PAYMENT LOADER
   ======================================== */

.payment-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f0f0f0;
    border-top: 5px solid #960114;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-content p {
    font-size: 18px;
    color: #121212;
    margin: 8px 0;
    font-weight: 600;
}

.loader-subtext {
    font-size: 14px !important;
    color: #666 !important;
    font-weight: 400 !important;
}

/* ========================================
   SUCCESS PAGE
   ======================================== */

.chauffeur-success-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.success-container {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.success-icon {
    margin-bottom: 24px;
}

.success-container h1 {
    font-size: 36px !important;
    font-weight: 700 !important;
    margin: 0 0 12px 0 !important;
    color: #4caf50 !important;
}

.success-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.confirmation-details {
    text-align: left;
    margin: 40px 0;
}

.detail-section {
    margin-bottom: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
}

.detail-section h2 {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 0 16px 0 !important;
    color: #121212 !important;
}

.booking-ref {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #960114 !important;
    margin: 0 !important;
    text-align: center;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.detail-value {
    color: #121212;
    font-weight: 600;
    text-align: right;
}

.total-section {
    background: linear-gradient(135deg, #960114 0%, #710010 100%);
    color: white;
}

.total-section h2 {
    color: white !important;
}

.total-row .detail-label,
.total-row .detail-value {
    color: white;
}

.total-amount {
    font-size: 32px !important;
    font-weight: 700 !important;
}

.success-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: rgba(150, 1, 20, 0.06);
    border-radius: 8px;
    margin: 32px 0;
}

.success-message p {
    margin: 0;
    font-size: 15px;
    color: #121212;
}

.success-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}

.success-actions .btn-primary,
.success-actions .btn-secondary {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.success-actions .btn-primary {
    background: #960114;
    color: white;
}

.success-actions .btn-primary:hover {
    background: #710010;
    transform: translateY(-2px);
}

.success-actions .btn-secondary {
    background: white;
    color: #960114;
    border: 2px solid #960114;
}

.success-actions .btn-secondary:hover {
    background: #f0f7ff;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .payment-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .booking-summary,
    .payment-form-section {
        padding: 20px;
    }
    
    .success-container {
        padding: 40px 24px;
    }
    
    .success-container h1 {
        font-size: 28px !important;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions .btn-primary,
    .success-actions .btn-secondary {
        width: 100%;
    }
}

/* Print styles for success page */
@media print {
    .success-actions {
        display: none;
    }
    
    .booking-progress {
        display: none;
    }
}

