/**
 * Juneo Referral - Styles
 * Minimal/neutre, s'adapte au thème existant
 */

/* ==========================================================================
   Widget "Mon Parrainage" (Section 2.1)
   ========================================================================== */

.juneo-referral-widget {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    text-align: center;
    /* TODO: couleur marque - background si nécessaire */
}

.juneo-referral-widget h2 {
    font-family: "Poppins", sans-serif !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    margin-bottom: 10px !important;
}

.juneo-referral-widget .description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* ==========================================================================
   Link Input & Copy Button
   ========================================================================== */

.juneo-link-container {
    display: flex;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.juneo-link-container input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 14px;
    background: #f9f9f9;
    color: #333;
}

.juneo-link-container input:focus {
    outline: none;
}

/* Copy Button */
#juneo-copy-link {
    display: inline-block;
    padding: 12px 30px;
    background-color: #388D26;
    font-family: "Patrick Hand", sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #FFFFFF;
    border: none;
    border-radius: 33px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
}

#juneo-copy-link:hover {
    background-color: #FFC11B;
}

#juneo-copy-link.copied {
    /* TODO: couleur succès */
    background: #28a745;
}

/* ==========================================================================
   Social Share Buttons (Section 2.3)
   ========================================================================== */

.juneo-share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.juneo-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.juneo-share-btn svg {
    width: 22px;
    height: 22px;
}

.juneo-share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

/* WhatsApp */
.juneo-share-btn[data-platform="whatsapp"] {
    background: #25D366;
    color: #fff;
}

/* Facebook */
.juneo-share-btn[data-platform="facebook"] {
    background: #0866FF;
    color: #fff;
}

/* Twitter/X */
.juneo-share-btn[data-platform="twitter"] {
    background: #000;
    color: #fff;
}

/* Email */
.juneo-share-btn[data-platform="email"] {
    background: #666;
    color: #fff;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */

.juneo-stats {
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.juneo-stats strong {
    /* TODO: couleur marque */
    color: #333;
}

/* ==========================================================================
   Coupons Table
   ========================================================================== */

.juneo-coupons-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    text-align: left;
}

.juneo-coupons-table th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.juneo-coupons-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 14px;
    color: #333;
}

.juneo-coupons-table tr:last-child td {
    border-bottom: 1px solid #eee;
}

.juneo-coupons-table .col-amount {
    color: #388D26;
    font-weight: 700;
}

.juneo-coupons-table .coupon-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #333;
    background: #f8f8f8;
    padding: 4px 8px;
    border-radius: 4px;
}

.juneo-coupons-table .status-available {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #388D26;
    font-size: 13px;
}

.juneo-coupons-table .status-available::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #388D26;
    border-radius: 50%;
}

.juneo-coupons-table .status-used {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #999;
    font-size: 13px;
}

.juneo-coupons-table .status-used::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
}

.juneo-coupons-table tr.row-used {
    opacity: 0.5;
}

/* ==========================================================================
   Toast Notification (Section 1.3)
   ========================================================================== */

.juneo-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.juneo-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==========================================================================
   Admin Page
   ========================================================================== */

.juneo-admin-wrap {
    max-width: 1200px;
}

.juneo-admin-wrap h1 {
    margin-bottom: 20px;
}

.juneo-admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.juneo-admin-table th,
.juneo-admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.juneo-admin-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.juneo-admin-table tr:hover {
    background: #fafafa;
}

.juneo-status-pending {
    color: #f0ad4e;
}

.juneo-status-rewarded {
    color: #5cb85c;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .juneo-referral-widget {
        padding: 20px 15px;
    }

    .juneo-link-container {
        flex-direction: column;
    }

    .juneo-link-container .copy-icon {
        justify-content: center;
        border-top: 1px solid #ddd;
    }

    .juneo-share-buttons {
        gap: 10px;
    }

    .juneo-share-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}
