/**
 * WC Legalization - v2.0.1
 * Clean, simple styles - works with dual-form themes
 */

.wcl-box {
    margin: 20px 0;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s;
}

.wcl-box:hover {
    border-color: #fb8104;
}

.wcl-box.active {
    border-color: #fb8104;
    background: linear-gradient(180deg, #fff8f2 0%, #fff 100%);
}

.wcl-box.error {
    border-color: #dc3545;
    animation: wcl-shake 0.4s ease;
}

@keyframes wcl-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Header - clickable area */
.wcl-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Custom checkbox */
.wcl-check {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 2px solid #ccc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
}

.wcl-check svg {
    width: 16px;
    height: 16px;
    opacity: 0;
    color: #fff;
    transition: opacity 0.2s;
}

.wcl-box.active .wcl-check {
    background: #fb8104;
    border-color: #fb8104;
}

.wcl-box.active .wcl-check svg {
    opacity: 1;
}

.wcl-box.error .wcl-check {
    border-color: #dc3545;
}

/* Info */
.wcl-info {
    flex: 1;
    min-width: 0;
}

.wcl-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a2744;
    line-height: 1.3;
}

.wcl-required {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #dc3545;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Price */
.wcl-price {
    font-size: 18px;
    font-weight: 700;
    color: #fb8104;
    white-space: nowrap;
}

/* Arrow */
.wcl-arrow {
    width: 24px;
    height: 24px;
    transition: transform 0.2s;
}

.wcl-arrow svg {
    width: 100%;
    height: 100%;
    color: #999;
}

.wcl-box.active .wcl-arrow {
    transform: rotate(180deg);
}

/* Details - hidden by default */
.wcl-details {
    display: none;
    padding: 16px;
    border-top: 1px solid #f0f0f0;
}

/* Features list */
.wcl-features {
    margin-bottom: 16px;
}

.wcl-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #555;
}

.wcl-feature span {
    color: #28a745;
    font-weight: bold;
}

/* Total bar */
.wcl-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1a2744, #2d3e5f);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.wcl-total strong {
    color: #fb8104;
    font-size: 18px;
}

/* Error message */
.wcl-error {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff5f5;
    border-top: 1px solid #ffebeb;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
}

.wcl-error svg {
    flex-shrink: 0;
}

/* ==========================================
   LOCKED STATE (Quote Mode)
   ========================================== */

.wcl-locked {
    cursor: default;
    pointer-events: none;
}

.wcl-locked .wcl-header {
    cursor: default;
}

.wcl-locked .wcl-check {
    opacity: 0.85;
}

.wcl-included {
    color: #28a745 !important;
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 768px) {
    .wcl-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px;
    }
    
    .wcl-check {
        order: 1;
    }
    
    .wcl-info {
        order: 2;
        flex: 1;
        min-width: calc(100% - 120px);
    }
    
    .wcl-arrow {
        order: 3;
    }
    
    .wcl-price {
        order: 4;
        width: 100%;
        padding-left: 40px;
        font-size: 16px;
    }
    
    .wcl-title {
        font-size: 13px;
    }
    
    .wcl-details {
        padding: 14px;
    }
    
    .wcl-feature {
        font-size: 12px;
    }
    
    .wcl-total {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wcl-box {
        margin: 15px 0;
    }
    
    .wcl-header {
        padding: 12px;
    }
    
    .wcl-check {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }
    
    .wcl-check svg {
        width: 14px;
        height: 14px;
    }
    
    .wcl-price {
        padding-left: 34px;
    }
}
