/* Estilos para o frontend */
.wc-checkbox-limit-container {
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    font-family: inherit;
}

.wc-checkbox-limit-title {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

.wc-checkbox-limit-title .required {
    color: #d63638;
    font-weight: bold;
}

/* Informações e contador */
.wc-checkbox-limit-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.wc-checkbox-limit-description {
    margin: 0;
    color: #666;
    font-size: 0.95em;
}

.wc-checkbox-limit-counter {
    background: #0073aa;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

/* Container das opções */
.wc-checkbox-limit-options {
    display: grid;
    gap: 12px;
    margin-bottom: 15px;
}

/* Opção individual */
.wc-checkbox-limit-option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wc-checkbox-limit-option:hover,
.wc-checkbox-limit-option.hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
    transform: translateY(-1px);
}

.wc-checkbox-limit-option.selected {
    border-color: #00a32a;
    background: #f0f8f0;
    box-shadow: 0 2px 8px rgba(0, 163, 42, 0.15);
}

/* Label da opção */
.wc-checkbox-option-label {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    cursor: pointer;
    margin: 0;
    width: 100%;
    gap: 12px;
    min-height: 50px;
}

.wc-checkbox-option-label:hover {
    background: rgba(0, 115, 170, 0.05);
}

.wc-checkbox-limit-option.selected .wc-checkbox-option-label {
    background: rgba(0, 163, 42, 0.05);
}

/* Checkbox input */
.wc-checkbox-option-input {
    margin: 0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0073aa;
}

.wc-checkbox-option-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Texto da opção */
.wc-checkbox-option-text {
    flex: 1;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.wc-checkbox-option-price {
    color: #0073aa;
    font-weight: 600;
    margin-left: 8px;
}

.wc-checkbox-option-description {
    display: block;
    font-size: 0.9em;
    color: #666;
    font-weight: 400;
    margin-top: 5px;
    font-style: italic;
}

/* Estados visuais do container */
.wc-checkbox-limit-container.limit-warning {
    border-color: #f0b849;
    background: #fffbf0;
}

.wc-checkbox-limit-container.limit-warning .wc-checkbox-limit-counter {
    background: #f0b849;
}

.wc-checkbox-limit-container.limit-reached {
    border-color: #d63638;
    background: #fff5f5;
}

.wc-checkbox-limit-container.limit-reached .wc-checkbox-limit-counter {
    background: #d63638;
}

/* Mensagens */
.wc-checkbox-limit-messages {
    margin-top: 10px;
}

.wc-checkbox-limit-error,
.wc-checkbox-limit-warning {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 500;
}

.wc-checkbox-limit-error {
    background: #ffeaea;
    border: 1px solid #d63638;
    color: #d63638;
}

.wc-checkbox-limit-warning {
    background: #fff8e1;
    border: 1px solid #f0b849;
    color: #8a6914;
}

/* Opções desabilitadas */
.wc-checkbox-limit-option:has(.wc-checkbox-option-input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

.wc-checkbox-limit-option:has(.wc-checkbox-option-input:disabled) .wc-checkbox-option-label {
    cursor: not-allowed;
}

.wc-checkbox-limit-option:has(.wc-checkbox-option-input:disabled):hover {
    transform: none;
    border-color: #e0e0e0;
    box-shadow: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .wc-checkbox-limit-container {
        margin: 15px 0;
        padding: 15px;
    }
    
    .wc-checkbox-limit-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wc-checkbox-limit-counter {
        align-self: flex-end;
    }
    
    .wc-checkbox-option-label {
        padding: 12px;
        gap: 10px;
    }
    
    .wc-checkbox-option-input {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .wc-checkbox-limit-container {
        margin: 10px 0;
        padding: 12px;
    }
    
    .wc-checkbox-limit-title {
        font-size: 1.1em;
    }
    
    .wc-checkbox-option-label {
        padding: 10px;
        min-height: 45px;
    }
    
    .wc-checkbox-option-text {
        font-size: 0.95em;
    }
    
    .wc-checkbox-option-description {
        font-size: 0.85em;
    }
}

/* Animações */
@keyframes checkboxPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.wc-checkbox-option-input:checked {
    animation: checkboxPulse 0.3s ease;
}

/* Acessibilidade */
.wc-checkbox-option-input:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.wc-checkbox-option-label:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Compatibilidade com temas */
.woocommerce .wc-checkbox-limit-container {
    font-family: inherit;
}

.woocommerce .wc-checkbox-limit-option input[type="checkbox"] {
    margin: 0;
}

/* Estados para screen readers */
.wc-checkbox-limit-container[aria-live="polite"] {
    /* Melhora acessibilidade para leitores de tela */
}

/* Indicador visual para opções obrigatórias */
.wc-checkbox-limit-container[data-required="yes"] .wc-checkbox-limit-title::after {
    content: " *";
    color: #d63638;
    font-weight: bold;
}

