/* EWER Complaint Source “Other” — professional responsive layout v80 */

#newCaseForm .case-intake-grid {
    align-items: start;
    margin-bottom: 1rem;
}

#newCaseForm .case-intake-grid > .form-group {
    min-width: 0;
    margin-bottom: 0 !important;
}

#newCaseForm .case-other-source-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(15rem, 0.8fr) minmax(0, 1.6fr);
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(67, 97, 238, 0.22);
    border-left: 4px solid var(--primary, #4361ee);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.075), rgba(99, 102, 241, 0.025));
    box-shadow: 0 8px 20px rgba(30, 41, 59, 0.055);
    animation: ewerOtherSourceReveal 160ms ease-out;
}

#newCaseForm .case-other-source-panel.hidden {
    display: none !important;
}

#newCaseForm .case-other-source-context {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

#newCaseForm .case-other-source-icon {
    display: inline-flex;
    flex: 0 0 2.35rem;
    width: 2.35rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(67, 97, 238, 0.13);
    color: var(--primary, #4361ee);
    font-size: 0.95rem;
}

#newCaseForm .case-other-source-copy {
    min-width: 0;
}

#newCaseForm .case-other-source-label {
    margin: 0 0 0.18rem !important;
    font-weight: 700;
    line-height: 1.25;
}

#newCaseForm .case-other-source-required {
    color: var(--danger, #dc2626);
}

#newCaseForm .case-other-source-help {
    display: block;
    margin: 0;
    color: var(--text-secondary, #64748b);
    font-size: 0.78rem;
    line-height: 1.4;
}

#newCaseForm .case-other-source-control {
    min-width: 0;
}

#newCaseForm .case-other-source-control .form-input {
    margin: 0 !important;
}

#newCaseForm .case-category-grid {
    align-items: start;
}

#newCaseForm .case-category-grid > .case-category-primary {
    grid-column: 1 / -1;
}

#newCaseForm .case-category-grid.has-other-category > .case-category-primary {
    grid-column: auto;
}

html.dark #newCaseForm .case-other-source-panel,
body.dark-mode #newCaseForm .case-other-source-panel {
    border-color: rgba(129, 140, 248, 0.34);
    border-left-color: #818cf8;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(30, 41, 59, 0.18));
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.2);
}

html.dark #newCaseForm .case-other-source-icon,
body.dark-mode #newCaseForm .case-other-source-icon {
    background: rgba(129, 140, 248, 0.2);
    color: #c7d2fe;
}

@keyframes ewerOtherSourceReveal {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    #newCaseForm .case-other-source-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.7rem;
        padding: 0.85rem;
    }

    #newCaseForm .case-other-source-icon {
        flex-basis: 2.15rem;
        width: 2.15rem;
        height: 2.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #newCaseForm .case-other-source-panel {
        animation: none;
    }
}
