/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://elementor.com/
 Description:  Thème enfant de Hello Elementor
 Author:       STRIVOK
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  hello-elementor-child
*/

/* Classe utilitaire : section pleine largeur */
.full-width-section {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

/*
 * CRAZY FISH & COMPAGNIE — Personnalisation du plugin TeraWallet
 * À ajouter à la fin du fichier style.css du thème enfant hello-elementor-child.
 *
 * Palette :
 *   Rose/magenta principal : #e43f5a
 *   Fond sombre            : #2d2d2d
 *   Texte clair            : #ffffff
 *   Fond carte             : #3a3a3a  (légèrement plus clair que le fond)
 *   Texte secondaire       : #cccccc
 *   Crédit (vert)          : #2ecc71
 *   Débit (rouge/rose)     : #e43f5a
 */

/* ===========================================================================
   CONTENEUR PRINCIPAL DU WALLET
   =========================================================================== */

.woo-wallet-my-wallet-container {
    background-color: #2d2d2d;
    color: #ffffff;
    border-radius: 12px;
    padding: 28px 24px;
    max-width: 900px;
    margin: 0 auto;
    font-family: inherit;
}

/* ===========================================================================
   HEADER
   =========================================================================== */

.woo-wallet-header {
    border-bottom: 2px solid #e43f5a;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.woo-wallet-header h2 {
    color: #ffffff;
    font-size: 1.6rem;
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.woo-wallet-header p {
    color: #cccccc;
    margin: 0;
    font-size: 0.9rem;
}

/* ===========================================================================
   TOP SECTION : BALANCE CARD + NAVIGATION
   =========================================================================== */

.woo-wallet-top-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 28px;
}

/* ===========================================================================
   BALANCE CARD — SOLDE MIS EN VALEUR
   =========================================================================== */

.woo-wallet-balance-card {
    background: linear-gradient(135deg, #e43f5a 0%, #c0303f 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 28px 32px;
    min-width: 220px;
    flex: 1 1 220px;
    box-shadow: 0 6px 24px rgba(228, 63, 90, 0.35);
    position: relative;
    overflow: hidden;
}

/* Cercle décoratif en arrière-plan */
.woo-wallet-balance-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.woo-wallet-balance-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.woo-wallet-balance-card h3 {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 12px;
}

/* Montant du solde — très visible */
.woo-wallet-balance-card .woo-wallet-price,
.woo-wallet-balance-card p.woo-wallet-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

/* Le prix WooCommerce inclut un <span class="woocommerce-Price-amount"> */
.woo-wallet-balance-card .woo-wallet-price .woocommerce-Price-amount,
.woo-wallet-balance-card .woo-wallet-price .woocommerce-Price-currencySymbol {
    color: #ffffff;
    font-size: inherit;
    font-weight: inherit;
}

/* ===========================================================================
   NAVIGATION PAR ONGLETS
   =========================================================================== */

.woo-wallet-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 2 1 300px;
    align-content: flex-start;
    padding-top: 4px;
}

.woo-wallet-nav-item-wrapper {
    position: relative;
}

.woo-wallet-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #3a3a3a;
    color: #cccccc;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.woo-wallet-nav-tab:hover {
    background-color: #4a4a4a;
    color: #ffffff;
    border-color: #e43f5a;
    text-decoration: none;
}

.woo-wallet-nav-tab.active {
    background-color: #e43f5a;
    color: #ffffff;
    border-color: #e43f5a;
    box-shadow: 0 3px 12px rgba(228, 63, 90, 0.4);
}

.woo-wallet-nav-tab .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

/* ===========================================================================
   ZONE DE CONTENU
   =========================================================================== */

.woo-wallet-content-area {
    background-color: #353535;
    border-radius: 10px;
    padding: 20px;
}

/* ===========================================================================
   TITRE DE SECTION
   =========================================================================== */

.woo-wallet-section-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #4a4a4a;
}

/* ===========================================================================
   TABLEAU DES TRANSACTIONS — RESPONSIVE ET LISIBLE
   =========================================================================== */

.woo-wallet-transactions-list {
    overflow-x: auto; /* Scroll horizontal sur mobile */
    -webkit-overflow-scrolling: touch;
}

.woo-wallet-transactions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    color: #cccccc;
}

.woo-wallet-transactions-table thead {
    background-color: #2d2d2d;
}

.woo-wallet-transactions-table thead th {
    color: #e43f5a;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid #e43f5a;
    white-space: nowrap;
}

.woo-wallet-transactions-table thead th:last-child {
    text-align: right;
}

.woo-wallet-transactions-table tbody tr {
    border-bottom: 1px solid #444;
    transition: background-color 0.15s;
}

.woo-wallet-transactions-table tbody tr:last-child {
    border-bottom: none;
}

.woo-wallet-transactions-table tbody tr:hover {
    background-color: #3f3f3f;
}

.woo-wallet-transactions-table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
}

/* Date */
.woo-wallet-transactions-table tbody td:first-child {
    color: #aaaaaa;
    white-space: nowrap;
    font-size: 0.82rem;
}

/* Description */
.woo-wallet-transactions-table tbody td:nth-child(2) {
    color: #dddddd;
}

/* Montants : crédit / débit */
.woo-wallet-transactions-table td.amount {
    text-align: right;
    font-weight: 700;
    white-space: nowrap;
}

.woo-wallet-transactions-table td.amount.credit {
    color: #2ecc71; /* vert pour les crédits */
}

.woo-wallet-transactions-table td.amount.debit {
    color: #e43f5a; /* rose pour les débits */
}

/* Message vide */
.woo-wallet-content-area > p,
.woo-wallet-content-area p[style*="text-align: center"] {
    color: #888888 !important;
    font-style: italic;
}

/* ===========================================================================
   FORMULAIRE TOPUP (visible admins uniquement, stylisé au cas où)
   =========================================================================== */

.woo-wallet-form-wrapper {
    background-color: #3a3a3a;
    border-radius: 10px;
    padding: 20px;
}

.woo-wallet-form-wrapper label {
    color: #cccccc;
    display: block;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.woo-wallet-form-wrapper .woo-wallet-balance-to-add {
    width: 100%;
    padding: 10px 14px;
    background-color: #2d2d2d;
    border: 1px solid #555;
    border-radius: 6px;
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 14px;
    box-sizing: border-box;
}

.woo-wallet-form-wrapper .woo-wallet-balance-to-add:focus {
    outline: none;
    border-color: #e43f5a;
    box-shadow: 0 0 0 2px rgba(228, 63, 90, 0.25);
}

.woo-wallet-form-wrapper .woo-add-to-wallet {
    background-color: #e43f5a;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 11px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.woo-wallet-form-wrapper .woo-add-to-wallet:hover {
    background-color: #c0303f;
}

/* ===========================================================================
   MINI-WALLET (menu de navigation)
   =========================================================================== */

.woo-wallet-menu-contents {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e43f5a;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.woo-wallet-menu-contents:hover {
    color: #ffffff;
    text-decoration: none;
}

.woo-wallet-menu-contents .woo-wallet-icon-wallet {
    font-size: 1rem;
}

/* ===========================================================================
   NOTICES WOOCOMMERCE DANS LE WALLET
   =========================================================================== */

.woo-wallet-my-wallet-container .woocommerce-message,
.woo-wallet-my-wallet-container .woocommerce-error,
.woo-wallet-my-wallet-container .woocommerce-info {
    margin-bottom: 16px;
    border-radius: 6px;
}

/* ===========================================================================
   DATATABLES (onglet Transactions complet)
   =========================================================================== */

.woo-wallet-content-area .dataTables_wrapper {
    color: #cccccc;
}

.woo-wallet-content-area .dataTables_length label,
.woo-wallet-content-area .dataTables_filter label,
.woo-wallet-content-area .dataTables_info,
.woo-wallet-content-area .dataTables_paginate {
    color: #aaaaaa;
    font-size: 0.82rem;
}

.woo-wallet-content-area .dataTables_length select,
.woo-wallet-content-area .dataTables_filter input {
    background-color: #2d2d2d;
    border: 1px solid #555;
    color: #ffffff;
    border-radius: 4px;
    padding: 4px 8px;
}

.woo-wallet-content-area .dataTables_paginate .paginate_button {
    color: #cccccc !important;
    border-radius: 4px;
}

.woo-wallet-content-area .dataTables_paginate .paginate_button.current,
.woo-wallet-content-area .dataTables_paginate .paginate_button:hover {
    background: #e43f5a !important;
    border-color: #e43f5a !important;
    color: #ffffff !important;
}

/* Table DataTables dans l'onglet Transactions */
.woo-wallet-content-area table.dataTable {
    color: #cccccc;
    border-color: #444;
}

.woo-wallet-content-area table.dataTable thead th {
    background-color: #2d2d2d;
    color: #e43f5a;
    border-bottom: 2px solid #e43f5a;
}

.woo-wallet-content-area table.dataTable tbody tr {
    background-color: transparent;
}

.woo-wallet-content-area table.dataTable tbody tr:hover {
    background-color: #3f3f3f;
}

.woo-wallet-content-area table.dataTable tbody td {
    border-color: #444;
}

/* Filtres date (daterangepicker adapté au fond sombre) */
.daterangepicker {
    background-color: #2d2d2d;
    border-color: #555;
    color: #ffffff;
}

.daterangepicker .calendar-table {
    background-color: #2d2d2d;
    border-color: #555;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: #e43f5a;
}

/* ===========================================================================
   RESPONSIVE — MOBILE
   =========================================================================== */

@media (max-width: 600px) {
    .woo-wallet-my-wallet-container {
        padding: 18px 14px;
        border-radius: 8px;
    }

    .woo-wallet-top-section {
        flex-direction: column;
    }

    .woo-wallet-balance-card {
        min-width: unset;
        padding: 22px 20px;
    }

    .woo-wallet-balance-card .woo-wallet-price {
        font-size: 2rem;
    }

    .woo-wallet-nav-tabs {
        flex-direction: column;
    }

    .woo-wallet-nav-tab {
        width: 100%;
        justify-content: center;
    }

    .woo-wallet-header h2 {
        font-size: 1.3rem;
    }

    .woo-wallet-content-area {
        padding: 14px 10px;
    }

    /* Tableau scrollable sur mobile */
    .woo-wallet-transactions-table {
        min-width: 480px;
    }
}
