/**
 * Plan Downgrade Confirmation Modal Styles
 *
 * Used by www-talarity/js/components/plan-downgrade-confirm-modal.js for the 3-stage
 * gate (written warning → type "I Agree" → re-authenticate) before a plan change that
 * removes a module, a cap or a plan tier.
 *
 * Token vocabulary deliberately mirrors evidence-delete-confirm-modal.css — the two are
 * the same kind of destructive confirmation, and a customer should not be able to tell
 * from the styling that they are different components. Every colour is a base.css
 * variable, so both themes come for free and no hex is written here.
 */

.plan-downgrade-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
}

.plan-downgrade-modal {
    background: var(--bg-elevated, var(--bg-primary, #fff));
    color: var(--text-primary, #1a1a1a);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: auto;
    padding: 1.5rem;
}

.plan-downgrade-heading {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-danger, #dc3545);
}

.plan-downgrade-heading--neutral {
    color: var(--text-primary);
}

.plan-downgrade-lead {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* The list of losses. Scrolls inside itself rather than growing the dialog past the
   viewport — a customer removing several modules at once must still be able to reach the
   Continue button. */
.plan-downgrade-list {
    list-style: none;
    margin: 0 0 1.25rem 0;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary, #f8f9fa);
    max-height: 260px;
    overflow-y: auto;
}

.plan-downgrade-item + .plan-downgrade-item {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.plan-downgrade-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
    justify-content: space-between;
}

.plan-downgrade-item-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    text-transform: capitalize;
}

.plan-downgrade-item-change {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-danger-text, var(--color-danger, #dc3545));
    white-space: nowrap;
}

.plan-downgrade-item-loses {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.plan-downgrade-input {
    width: 100%;
    padding: 0.5rem 0.625rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.plan-downgrade-input:focus {
    outline: 2px solid var(--color-primary, #3b82f6);
    outline-offset: 1px;
}

.plan-downgrade-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.plan-downgrade-msg {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.plan-downgrade-msg--error {
    color: var(--color-danger-text, var(--color-danger, #dc3545));
}
