/**
 * Payment Summary Modal Styles
 * Provides styling for the payment confirmation modal
 */

.payment-summary-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 90%;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

.modal-content h2 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.modal-content .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-content .close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Summary Section */
.summary-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.summary-section h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.summary-section .location {
    margin: 0.5rem 0;
    color: #555;
    font-weight: 500;
    line-height: 1.4;
}

.summary-section .distance {
    margin: 0;
    font-size: 0.9rem;
    color: #999;
}

/* Details Grid */
.summary-details {
    margin: 1.5rem 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span {
    color: #666;
    font-size: 0.95rem;
}

.detail-row strong {
    color: #2c3e50;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* Total Amount */
.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: #f0f7ff;
    border-left: 4px solid #007bff;
    border-radius: 6px;
    margin: 1.5rem 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.summary-total span {
    color: #555;
}

.summary-total .amount {
    font-size: 1.75rem;
    color: #28a745;
    font-weight: 700;
}

/* Terms Checkbox */
.summary-terms {
    margin: 1.5rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.summary-terms input[type="checkbox"] {
    margin-top: 0.35rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #007bff;
}

.summary-terms label {
    font-size: 0.95rem;
    color: #555;
    cursor: pointer;
    line-height: 1.4;
}

.summary-terms a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.summary-terms a:hover {
    text-decoration: underline;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions button {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
    color: #222;
}

.btn-primary {
    background: #28a745;
    color: white;
}

.btn-primary:hover {
    background: #218838;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-primary:active {
    background: #1e7e34;
    transform: scale(0.98);
}

/* Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* Responsive */
@media (max-width: 480px) {
    .modal-content {
        max-width: 95%;
        padding: 1.5rem;
    }

    .modal-content h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .summary-total {
        flex-direction: column;
        gap: 0.5rem;
    }

    .summary-total .amount {
        text-align: right;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .payment-summary-modal {
        display: none !important;
    }
}
