/**
 * Canal de Denúncias - Casa Aura
 * Frontend Styles
 */

:root {
    --cda-primary: #66246d;
    --cda-primary-light: #8a3a8f;
    --cda-primary-dark: #4a1a4e;
    --cda-primary-bg: rgba(102, 36, 109, 0.08);
    --cda-primary-border: rgba(102, 36, 109, 0.2);
    --cda-bg: #F8F5FA;
    --cda-white: #ffffff;
    --cda-text: #2d2d2d;
    --cda-text-light: #6b7280;
    --cda-text-lighter: #9ca3af;
    --cda-error: #dc2626;
    --cda-error-bg: #fef2f2;
    --cda-success: #16a34a;
    --cda-success-bg: #f0fdf4;
    --cda-border: #e5e7eb;
    --cda-radius: 12px;
    --cda-radius-sm: 8px;
    --cda-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --cda-shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
}

/* ===== HERO SECTION ===== */
.cda-hero {
    background: linear-gradient(135deg, var(--cda-primary) 0%, var(--cda-primary-dark) 100%);
    padding: 60px 40px;
    border-radius: var(--cda-radius);
    margin-bottom: 32px;
    color: var(--cda-white);
}

.cda-hero-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.cda-logo {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cda-logo svg {
    width: 32px;
    height: 32px;
}

.cda-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.cda-subtitle {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
    margin: 4px 0 0 0;
}

.cda-hero-text {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 680px;
    margin: 0;
}

/* ===== PROGRESS STEPS ===== */
.cda-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.cda-progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.cda-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cda-primary-bg);
    border: 2px solid var(--cda-primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--cda-text-light);
    transition: all 0.3s ease;
}

.cda-step-active .cda-step-number {
    background: var(--cda-primary);
    border-color: var(--cda-primary);
    color: var(--cda-white);
}

.cda-step-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--cda-text-lighter);
    white-space: nowrap;
}

.cda-step-active .cda-step-label {
    color: var(--cda-primary);
    font-weight: 600;
}

.cda-progress-step:not(:last-child)::after {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--cda-border);
    margin: 0 8px;
}

/* ===== CARDS ===== */
.cda-card {
    background: var(--cda-white);
    border: 1px solid var(--cda-border);
    border-radius: var(--cda-radius);
    box-shadow: var(--cda-shadow);
    margin-bottom: 24px;
    overflow: hidden;
}

.cda-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--cda-border);
}

.cda-icon {
    width: 44px;
    height: 44px;
    background: var(--cda-primary-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cda-primary);
    flex-shrink: 0;
}

.cda-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--cda-text);
    margin: 0 0 4px 0;
}

.cda-required-note {
    font-size: 13px;
    color: var(--cda-text-lighter);
}

.cda-card-body {
    padding: 24px 28px;
}

/* ===== RADIO GROUPS ===== */
.cda-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cda-radio-inline {
    gap: 8px;
}

.cda-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border: 2px solid var(--cda-border);
    border-radius: var(--cda-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--cda-white);
    height: auto;
    min-height: 48px;
    line-height: 1.4;
}

.cda-radio-label:hover {
    border-color: var(--cda-primary-light);
    background: var(--cda-primary-bg);
}

.cda-radio-input:checked + .cda-radio-text {
    color: var(--cda-primary);
    font-weight: 600;
}

.cda-radio-label:has(.cda-radio-input:checked) {
    border-color: var(--cda-primary);
    background: var(--cda-primary-bg);
}

.cda-radio-text {
    font-size: 15px;
    color: var(--cda-text);
}

.cda-radio-input {
    width: 18px;
    height: 18px;
    accent-color: var(--cda-primary);
    cursor: pointer;
}

/* ===== FORM FIELDS ===== */
.cda-field {
    margin-bottom: 20px;
}

.cda-field:last-child {
    margin-bottom: 0;
}

.cda-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--cda-text);
    margin-bottom: 6px;
}

.cda-field-hint {
    font-size: 13px;
    color: var(--cda-text-light);
    margin-bottom: 8px;
}

.cda-input,
.cda-select,
.cda-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--cda-border);
    border-radius: var(--cda-radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--cda-text);
    background: var(--cda-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    height: auto;
    min-height: 48px;
    line-height: 1.5;
    overflow: visible;
    text-overflow: clip;
}

.cda-input:focus,
.cda-select:focus,
.cda-textarea:focus {
    outline: none;
    border-color: var(--cda-primary);
    box-shadow: 0 0 0 3px var(--cda-primary-bg);
}

.cda-input::placeholder,
.cda-textarea::placeholder {
    color: var(--cda-text-lighter);
}

.cda-textarea {
    resize: vertical;
    min-height: 120px;
}

.cda-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ===== FILE INPUT ===== */
.cda-file-input {
    padding: 10px 16px;
    border: 2px dashed var(--cda-border);
    border-radius: var(--cda-radius-sm);
    background: var(--cda-bg);
    width: 100%;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.cda-file-input:hover {
    border-color: var(--cda-primary-light);
}

/* ===== DIVIDER ===== */
.cda-divider {
    height: 1px;
    background: var(--cda-border);
    margin: 20px 0;
}

/* ===== INFO TEXT ===== */
.cda-info-text {
    font-size: 14px;
    color: var(--cda-text-light);
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ===== CHECKBOX ===== */
.cda-checkbox-wrapper {
    padding: 20px 24px;
    background: var(--cda-primary-bg);
    border: 1px solid var(--cda-primary-border);
    border-radius: var(--cda-radius-sm);
}

.cda-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.cda-checkbox-input {
    width: 20px;
    height: 20px;
    accent-color: var(--cda-primary);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.cda-checkbox-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--cda-text);
}

/* ===== SUBMIT ===== */
.cda-submit-section {
    text-align: center;
    padding: 24px 0 32px;
}

.cda-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 48px;
    background: var(--cda-primary);
    color: var(--cda-white);
    border: none;
    border-radius: var(--cda-radius-sm);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--cda-shadow-md);
}

.cda-submit-btn:hover {
    background: var(--cda-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(102, 36, 109, 0.2);
}

.cda-submit-btn:active {
    transform: translateY(0);
}

.cda-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cda-submit-note {
    font-size: 13px;
    color: var(--cda-text-light);
    margin-top: 12px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== SUCCESS MESSAGE ===== */
.cda-success {
    text-align: center;
    padding: 60px 40px;
    background: var(--cda-white);
    border: 1px solid var(--cda-border);
    border-radius: var(--cda-radius);
    box-shadow: var(--cda-shadow-md);
    max-width: 600px;
    margin: 0 auto;
}

.cda-success-icon {
    width: 80px;
    height: 80px;
    background: var(--cda-success-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--cda-success);
}

.cda-success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--cda-text);
    margin: 0 0 16px 0;
}

.cda-success-protocol {
    font-size: 18px;
    color: var(--cda-text);
    margin-bottom: 24px;
}

.cda-success-protocol strong {
    color: var(--cda-primary);
    font-size: 22px;
}

.cda-success-info {
    text-align: left;
    background: var(--cda-bg);
    border-radius: var(--cda-radius-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.cda-success-info p {
    font-size: 14px;
    color: var(--cda-text-light);
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.cda-success-info p:last-child {
    margin-bottom: 0;
}

/* ===== FOOTER ===== */
.cda-footer {
    text-align: center;
    padding: 32px 20px;
    border-top: 1px solid var(--cda-border);
    margin-top: 24px;
}

.cda-footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cda-primary);
}

.cda-footer-logo svg {
    width: 16px;
    height: 16px;
}

.cda-footer p {
    font-size: 12px;
    color: var(--cda-text-lighter);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== ERROR STATES ===== */
.cda-error-message {
    background: var(--cda-error-bg);
    border: 1px solid #fecaca;
    color: var(--cda-error);
    padding: 12px 16px;
    border-radius: var(--cda-radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}

.cda-field.cda-error .cda-input,
.cda-field.cda-error .cda-select,
.cda-field.cda-error .cda-textarea {
    border-color: var(--cda-error);
}

/* ===== LOADING ===== */
.cda-submit-btn.cda-loading {
    position: relative;
    color: transparent;
}

.cda-submit-btn.cda-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--cda-white);
    border-radius: 50%;
    animation: cda-spin 0.6s linear infinite;
}

@keyframes cda-spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .cda-hero {
        padding: 40px 24px;
    }

    .cda-title {
        font-size: 24px;
    }

    .cda-card-body {
        padding: 20px;
    }

    .cda-card-header {
        padding: 20px;
    }

    .cda-progress {
        gap: 4px;
    }

    .cda-progress-step:not(:last-child)::after {
        width: 20px;
        margin: 0 4px;
    }

    .cda-step-label {
        display: none;
    }

    .cda-radio-group {
        flex-direction: column;
    }

    .cda-radio-label {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cda-hero {
        padding: 32px 16px;
        border-radius: 8px;
    }

    .cda-title {
        font-size: 20px;
    }

    .cda-card {
        border-radius: 8px;
        margin-bottom: 16px;
    }

    .cda-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== OVERRIDE AGGRESSIVE - Fix theme conflicts ===== */
.cda-container .cda-select,
.cda-container select.cda-select {
    height: auto !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
    padding: 12px 40px 12px 16px !important;
    font-size: 15px !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}

.cda-container .cda-input,
.cda-container input.cda-input {
    height: auto !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
}

.cda-container .cda-textarea,
.cda-container textarea.cda-textarea {
    height: auto !important;
    min-height: 120px !important;
    line-height: 1.6 !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
}

.cda-container .cda-radio-label {
    height: auto !important;
    min-height: 48px !important;
    line-height: 1.4 !important;
    padding: 14px 20px !important;
    white-space: normal !important;
}
