/**
 * Styles pour la page de paiement
 * 
 * Ce fichier contient tous les styles pour la page de paiement,
 * inspirés de l'interface d'Airbnb.
 */

/* Import des polices */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Styles généraux */
.awayout-payment-container {
    font-family: 'Roboto', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
}

.awayout-payment-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.background-grey-back-icone {
    background-color: #EDEDED;
    padding: 8px;
    border-radius: 50px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.awayout-payment-back {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
    margin-right: 20px;
    font-size: 14px;
}

.awayout-payment-back i {
    margin: 0!important;
}

.awayout-payment-title {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}

.awayout-payment-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.awayout-payment-left {
    flex: 1;
    min-width: 300px;
}

.awayout-payment-right {
    width: 420px;
}

/* Sections de paiement */
.awayout-payment-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.awayout-payment-section-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 20px 0;
}

/* Options de paiement */
.awayout-payment-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    margin-bottom: 15px;
}

.awayout-payment-option.active {
    background-color: #fff;
}

.awayout-payment-option-radio {
    display: flex;
    align-items: center;
}

.awayout-payment-option-radio input[type="radio"] {
    margin-right: 10px;
}

.awayout-payment-option-radio label {
    font-size: 16px;
}

.awayout-payment-option-change {
    background: none;
    border: none;
    color: #F97C5A;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
}

/* Méthodes de paiement */
.awayout-payment-methods {
    margin-bottom: 20px;
}

.awayout-payment-method {
    border: 1px solid #eaeaea;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.awayout-payment-method.active {
}

.awayout-payment-method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    cursor: pointer;
}

.awayout-payment-method.active .awayout-payment-method-header {
    background-color: #fff;
}

.awayout-payment-method-radio {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.awayout-payment-method-icons {
    display: flex;
    align-items: center;
}

.awayout-payment-method-icons .payment-icon {
    height: 20px;
    margin-left: 5px;
}

.awayout-payment-method-radio input[type="radio"] {
    margin-right: 10px;
}

.awayout-payment-method-radio label {
    font-size: 16px;
}

.awayout-payment-method-icons {
    display: flex;
    gap: 5px;
}

.payment-icon {
    height: 24px;
    width: auto;
}

.awayout-payment-method-content {
    padding: 12px;
    border-top: 1px solid #eaeaea;
}

/* Formulaire de paiement */
.awayout-payment-form {
    margin-bottom: 20px;
}

.awayout-form-group {
    margin-bottom: 10px;
}

.awayout-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.awayout-form-row .awayout-form-group {
    flex: 1;
    margin-bottom: 0;
}

.awayout-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
}

.awayout-form-control {
    width: 100%;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    margin-bottom: 15px;
}

.awayout-form-control:focus {
    border-color: #F97C5A;
    outline: none;
}

.awayout-form-error {
    color: #df1b41;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    height: 0;
}

.awayout-form-error:not(:empty) {
    display: block;
    height: auto;
    margin-top: 5px;
}

.awayout-form-info {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.awayout-form-info i {
    margin-right: 5px;
    color: #F97C5A;
}

/* Bouton de paiement */
.awayout-payment-submit {
    width: 100%;
    background-color: #f97c5B;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
}

.awayout-payment-submit:hover {
    background-color: #f97c5B;
}

/* Loader pour le bouton de paiement */
.awayout-payment-submit.loading {
    color: transparent;
}

.awayout-payment-submit.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

.awayout-payment-submit:disabled {
    background-color: #f5a5b8;
    cursor: not-allowed;
}

.awayout-payment-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

.awayout-payment-secure i {
    margin-right: 5px;
    color: #28a745;
}

/* Messages de paiement */
.awayout-payment-message {
    margin: 15px 0;
    min-height: 20px;
}

.awayout-payment-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.awayout-payment-error {
    padding: 10px;
    background-color: #fff5f5;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    color: #df1b41;
    font-size: 14px;
}

.awayout-payment-success {
    padding: 10px;
    background-color: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    color: #28a745;
    font-size: 14px;
}

/* Conditions générales */
.awayout-payment-terms {
    font-size: 12px;
    color: #666;
    margin-top: 20px;
}

.awayout-payment-terms a {
    color: #F97C5A;
    text-decoration: none;
}

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

/* Récapitulatif de la réservation */
.awayout-payment-summary {
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 18px;
    padding: 20px;
    position: sticky;
    top: 40px;
    font-family: 'Poppins', sans-serif;
}

.awayout-payment-property {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.awayout-payment-property-image {
    width: 120px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-right: 15px;
}

.awayout-payment-property-info {
    flex: 1;
}

.awayout-payment-property-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 5px 0;
}

.awayout-payment-property-rating {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.awayout-payment-property-rating i {
    color: #F97C5A;
    margin-right: 3px;
}

.awayout-payment-property-badge {
    display: inline-block;
    padding: 3px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.awayout-payment-info-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.awayout-payment-info-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.awayout-payment-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.awayout-payment-info-label {
    font-size: 14px;
    color: #666;
}

.awayout-payment-info-value {
    font-size: 14px;
    font-weight: 500;
}

.awayout-payment-price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.awayout-payment-price-label {
    font-size: 14px;
    color: #666;
}

.awayout-payment-price-value {
    font-size: 14px;
}

.awayout-payment-total {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    font-weight: 500;
}

.awayout-payment-total-label {
    font-size: 16px;
}

.awayout-payment-total-value {
    font-size: 16px;
}

.awayout-payment-cancellation {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

.awayout-payment-cancellation-badge {
    font-weight: 500;
    margin-bottom: 5px;
}

.awayout-payment-cancellation-badge i {
    color: #28a745;
    margin-right: 5px;
}

.awayout-payment-cancellation-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.awayout-payment-cancellation-link {
    font-size: 14px;
}

.awayout-payment-cancellation-link a {
    color: #F97C5A;
    text-decoration: none;
}

.awayout-payment-rare-find {
    display: flex;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background-color: #fff8e1;
    border-radius: 8px;
}

.awayout-payment-rare-find-icon {
    margin-right: 10px;
    color: #ff9800;
    font-size: 20px;
}

.awayout-payment-rare-find-text {
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .awayout-payment-content {
        flex-direction: column;
    }
    
    .awayout-payment-right {
        width: 100%;
        order: -1;
        margin-bottom: 30px;
    }
    
    .awayout-payment-summary {
        position: static;
    }
    
    .awayout-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .awayout-form-row .awayout-form-group {
        margin-bottom: 0;
    }
}

/* Styles pour le loader de redirection */
.awayout-redirect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.awayout-redirect-overlay.active {
    opacity: 1;
    visibility: visible;
}

.awayout-redirect-spinner {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #e91e63;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.awayout-redirect-message {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    text-align: center;
    max-width: 80%;
}

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