/**
 * awesome-payout-console/assets/css/apc-payout-frontend.css
 * Styles de l'interface du tableau de bord vendeur et de la modale SCF
 */

/**
 * awesome-payout-console/assets/css/apc-payout-frontend.css
 * Styles de l'interface du tableau de bord vendeur et de la modale SCF
 *
 * OPA VERSION : Gestion d'état déportée, harmonisation des cartes principales et intégration SCF
 */

/*==========================================================================
 * STRUCTURE GLOBALE ET ALERTES DE STATUT
 *==========================================================================*/

/* Conteneur global et alertes */
.apc-payout-dashboard {
    width: 100%;
}

/* Alerte de succès (Style Vert Google/Material) */
.apc-payout-success-alert {
    background: #e6f4ea;
    border-left: 4px solid #137333;
    color: #137333;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}

/* Alerte de danger rouge (Style OPA) */
.apc-payout-danger-alert {
    background: #fce8e6;
    border-left: 4px solid #d93025;
    color: #c5221f;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: 500;
}
.apc-payout-danger-alert .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

/*==========================================================================
 * GRILLE ET COMPOSANTS DES CARTES BANCAIRES / MODE DE PAIEMENT
 *==========================================================================*/

/*===== Grille =====*/
.apc-payout-card-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Structure principale de la carte vendeur */
.apc-payout-card {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Modificateur d'état : Bordure d'accentuation marquée si le compte est principal (Style OPA) */
/*.apc-payout-card.apc-is-principal {
    border: 2px solid #137333;
    box-shadow: 0 4px 12px rgba(19, 115, 51, 0.15);
}*/

/* Corps de la carte */
.apc-payout-card-body {
    display: flex;
    padding: 24px;
    align-items: flex-start;
    gap: 20px;
    flex-grow: 1;
}

/* Conteneur de l'icône de type de paiement (Banque, Mobile Money, etc.) */
.apc-payout-card-icon-box {
    background: #9E9E9E;
    color: #ffffff;
    width: 80px;
    height: 55px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.apc-payout-card-icon-box .apc-payout-svg-icon {
    width: 40px;
    height: 40px;
    fill: #ffffff;
}

/* Textes et métadonnées de la carte */
.apc-payout-card-text h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #202124;
}
.apc-payout-card-account-details,
.apc-payout-card-account-owner,
.apc-payout-card-account-country {
    margin: 0;
    font-size: 14px;
    color: #5f6368;
    line-height: 1.2;
}

/*==========================================================================
 * FOOTER DES CARTES ET ACTIONS UTILISATEURS
 *==========================================================================*/

/* Footer de carte et boutons */
.apc-payout-card-footer {
    border-top: 1px solid #f1f3f4;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}
.apc-payout-card-badge-principal {
    font-size: 13px;
    color: #137333;
    background: #e6f4ea;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}
.apc-payout-card-footer-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Liens d'action (Modifier / Supprimer) */
.apc-payout-card-link-delete, 
.apc-payout-card-link-edit {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}
.apc-payout-card-link-edit { color: #1a73e8; }
.apc-payout-card-link-edit:hover { color: #1557b0; }

.apc-payout-card-link-delete { color: #d93025; }
.apc-payout-card-link-delete:hover { color: #b31412; }

/* Le lien pour définir comme principal */
.apc-payout-link-set-main {
    color: #9262ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.1;
    transition: color 0.15s ease;
}
.apc-payout-link-set-main:hover {
    /*color: #1557b0;
    text-decoration: underline;*/
    text-decoration: none;
}

/*==========================================================================
 * DECLENCHEUR D'OUVERTURE (CARTE VIDE DE REVERSEMENT)
 *==========================================================================*/

/*===== Carte Bouton Ajouter =====*/
.apc-payout-add-card-button {
    border: 2px dashed #dadce0;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 176px; /* Aligné sur la hauteur des cartes standard + bordures */
    box-sizing: border-box;
    transition: background-color 0.2s, border-color 0.2s;
}
.apc-payout-add-card-button:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
}
.apc-payout-add-icon {
    font-size: 32px;
    color: #5f6368;
    margin-bottom: 8px;
    line-height: 1;
}
.apc-payout-add-card-button h3 {
    font-size: 16px;
    margin: 0 0 4px 0;
    color: #202124;
}
.apc-payout-add-card-button p {
    margin: 0;
    font-size: 14px;
    color: #5f6368;
}

/*==========================================================================
 * MODALE EN FRONT-END (FENÊTRE POPUP ACF / SCF)
 *==========================================================================*/

/* Classe d'état déportée pour la gestion de l'affichage de la modale */
.apc-payout-modal.apc-modal-hidden {
    display: none !important;
}

/* Conteneur d'arrière-plan opaque (Overlay complet) */
.apc-payout-modal-container {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    z-index: 99999;
    background-color: rgba(0, 0, 0, 0.6);
}

/* Boîte de dialogue interne de la modale */
.apc-payout-modal-himself {
    display: flex;
    margin-left: 15px;
    margin-right: 15px;
    flex-direction: column;
    width: 100%;
    height: 85%;
    border-radius: 12px;
    overflow: hidden;
    background-color: #FFFFFF; 
    color: #212121;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
}

/* Support du Mode Sombre pour la modale */
.dark .apc-payout-modal-himself {
    background-color: #111418; 
    color: #FFFFFF;
}

/* En-tête de la fenêtre modale */
.apc-payout-modal-header {
    flex-shrink: 0;
    height: 55px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #E2E8F0;
    background: #F8FAFC;
}
.dark .apc-payout-modal-header {
    border-bottom: 1px solid #404555;
    background: #1a1f26;
}

.apc-payout-modal-title {
    font-weight: 700;
    font-size: 16px;
    color: #1e293b;
}
.dark .apc-payout-modal-title {
    color: #f1f5f9;
}

/* Bouton de fermeture de la modale (Croix de fermeture) */
.apc-payout-modal-close-button {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.15s ease;
}
.apc-payout-modal-close-button:hover {
    color: #ef4444;
}

/* Zone de contenu défilable accueillant le formulaire ACF/SCF */
.apc-payout-modal-content-area-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
}

/* Neutralisation et intégration fluide des structures de formulaires SCF */
.apc-payout-modal-content-area-container .acf-form {
    width: 100% !important;
    margin: 0 !important;
}

/* Structure du bouton d'envoi du formulaire SCF interpénétré */
.apc-payout-modal-himself .acf-form-submit {
    margin-top: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

/*==========================================================================
 * RESPONSIVE ET ADAPTATIONS MEDIA QUERIES
 *==========================================================================*/
@media (min-width: 721px) {
    .apc-payout-modal-himself {
        width: 550px;
        height: auto;
        max-height: 80%;
    }
}












