/* ==========================================================================
   Gestion Toner Pro - Option Produit - Frontend CSS
   ========================================================================== */

:root {
    --gtp-primary: #2563eb;
    --gtp-primary-dark: #1d4ed8;
    --gtp-success: #10b981;
    --gtp-success-dark: #059669;
    --gtp-bg-light: #f0fdf4;
    --gtp-border: #86efac;
    --gtp-text: #166534;
    --gtp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Option Box sur la page produit
   ========================================================================== */

.gtp-option-wrapper {
    margin: 20px 0;
    clear: both;
}

.gtp-option-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid var(--gtp-border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.gtp-option-box:hover {
    border-color: var(--gtp-success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.gtp-option-box.gtp-selected {
    border-color: var(--gtp-success);
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Header avec checkbox et titre */
.gtp-option-header-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

/* Checkbox personnalisée */
.gtp-checkbox-container {
    position: relative;
    display: block;
    cursor: pointer;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin: 0 !important;
    padding: 0 !important;
}

.gtp-checkbox-container input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    cursor: pointer !important;
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 10 !important;
}

.gtp-checkmark-custom {
    position: absolute;
    top: 0;
    left: 0;
    height: 28px;
    width: 28px;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.gtp-checkbox-container:hover .gtp-checkmark-custom {
    border-color: var(--gtp-success);
}

.gtp-checkbox-container input[type="checkbox"]:checked ~ .gtp-checkmark-custom {
    background-color: var(--gtp-success);
    border-color: var(--gtp-success);
}

.gtp-checkmark-custom:after {
    content: "";
    position: absolute;
    display: none;
    left: 9px;
    top: 4px;
    width: 7px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.gtp-checkbox-container input[type="checkbox"]:checked ~ .gtp-checkmark-custom:after {
    display: block;
}

/* Titre et prix */
.gtp-option-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
    gap: 10px;
}

.gtp-option-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--gtp-text);
}

.gtp-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    color: var(--gtp-success);
}

.gtp-option-price {
    background: var(--gtp-success);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.gtp-price-period {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

/* Contenu */
.gtp-option-content {
    padding-left: 43px;
}

.gtp-option-description {
    font-size: 14px;
    color: #374151;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.gtp-option-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 15px;
}

.gtp-feature {
    font-size: 13px;
    color: var(--gtp-text);
    font-weight: 500;
}

.gtp-option-prerequis {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 10px 0;
    padding-top: 12px;
    border-top: 1px dashed #a7f3d0;
}

.gtp-option-prerequis strong {
    color: #374151;
}

/* Avertissement rouge clignotant */
.gtp-option-warning {
    margin: 10px 0 0 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #dc2626 !important;
    line-height: 1.6 !important;
    animation: gtp-blink 1s ease-in-out infinite !important;
}

@keyframes gtp-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}

/* ==========================================================================
   Badge dans le panier
   ========================================================================== */

.gtp-cart-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--gtp-success) 0%, var(--gtp-success-dark) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* WooCommerce cart item data */
.woocommerce-cart-form dl.variation dt,
.woocommerce-cart-form dl.variation dd {
    margin-bottom: 5px;
}

/* ==========================================================================
   Page Mon Compte - Abonnements
   ========================================================================== */

.gtp-client-dashboard {
    max-width: 900px;
    margin: 0 auto;
}

.gtp-dashboard-header {
    margin-bottom: 30px;
}

.gtp-dashboard-header h2 {
    font-size: 24px;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.gtp-dashboard-header p {
    color: #6b7280;
    margin: 0;
}

.gtp-subscription-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--gtp-shadow);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.gtp-subscription-header {
    background: linear-gradient(135deg, var(--gtp-success) 0%, var(--gtp-success-dark) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gtp-subscription-header.gtp-paused {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gtp-subscription-header.gtp-cancelled {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.gtp-subscription-product {
    font-size: 18px;
    font-weight: 700;
}

.gtp-subscription-status {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.gtp-subscription-body {
    padding: 20px;
}

.gtp-subscription-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.gtp-detail-item {
    display: flex;
    flex-direction: column;
}

.gtp-detail-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.gtp-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.gtp-subscription-footer {
    padding: 15px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
}

.gtp-no-subscriptions {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.gtp-no-subscriptions svg {
    width: 64px;
    height: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.gtp-no-subscriptions p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

.gtp-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.gtp-login-required p {
    margin-bottom: 15px;
    color: #6b7280;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .gtp-option-box {
        padding: 15px;
    }
    
    .gtp-option-header-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .gtp-option-title-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gtp-option-content {
        padding-left: 0;
    }
    
    .gtp-option-features {
        flex-direction: column;
        gap: 5px;
    }
    
    .gtp-checkbox-container {
        width: 24px;
        height: 24px;
    }
    
    .gtp-checkmark-custom {
        width: 24px;
        height: 24px;
    }
    
    .gtp-checkmark-custom:after {
        left: 7px;
        top: 3px;
        width: 6px;
        height: 12px;
    }
}
