﻿.subject-info-dialog {
    --store-primary: var(--apparel-green);
    --store-primary-hover: var(--apparel-green-hover);
    --store-primary-soft: var(--apparel-green-soft);
    --store-surface: var(--apparel-surface);
    --store-surface-muted: var(--apparel-surface-alt);
    --store-ink: var(--apparel-ink);
    --store-muted: var(--apparel-muted);
    --store-border: var(--apparel-border);
    --store-border-strong: var(--apparel-border-strong);
    width: min(35rem, calc(100vw - 2rem));
    max-width: 35rem;
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    background: var(--store-surface);
    border: 1px solid rgba(23, 35, 28, 0.12);
    border-radius: 1.125rem;
    box-shadow: var(--apparel-shadow-dialog);
}

    .subject-info-dialog::before {
        display: block;
        width: 100%;
        height: 0.3rem;
        content: "";
        background: var(--store-primary);
    }

    .subject-info-dialog .mud-dialog-content {
        padding: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--store-surface-muted);
    }

.subject-dialog-content {
    padding: clamp(1rem, 3vw, 1.5rem);
}

.subject-info-card {
    padding: clamp(1rem, 3vw, 1.5rem);
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    border-radius: 0.9rem;
    box-shadow: 0 0.4rem 1.25rem rgba(23, 35, 28, 0.06);
}

.subject-info-header {
    margin-bottom: 1.25rem;
}

.subject-info-title {
    color: var(--store-ink);
    font-size: clamp(1.25rem, 3vw, 1.55rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.subject-info-description {
    margin-top: 0.35rem;
    color: var(--store-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.subject-info-divider {
    margin-top: 1rem;
    border-color: var(--store-border);
}

.subject-info-grid {
    margin: 0;
    padding: 0;
}

.subject-field-item {
    padding: 1rem 0 !important;
}

.subject-input {
    width: 100%;
    margin: 0 !important;
}

.subject-info-dialog .mud-input-control {
    margin-top: 0;
}

.subject-info-dialog .mud-input-outlined-border {
    border-color: var(--store-border-strong);
    border-radius: 0.65rem;
}

.subject-info-dialog
.mud-input-control:hover
.mud-input-outlined-border {
    border-color: var(--apparel-focus);
}

.subject-info-dialog
.mud-input-control.mud-input-focused
.mud-input-outlined-border {
    border-width: 2px;
    border-color: var(--store-primary);
}

.subject-info-dialog .mud-input-label {
    color: #4f5e55;
    font-weight: 650;
}

    .subject-info-dialog .mud-input-label.mud-input-label-inputcontrol {
        background: var(--store-surface);
    }

.subject-info-dialog .mud-error-text {
    margin-top: 0.35rem;
    color: #a12a2a;
    font-size: 0.78rem;
    font-weight: 650;
}

.subject-info-dialog .mud-dialog-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--store-border);
    box-shadow: 0 -0.5rem 1.4rem rgba(23, 35, 28, 0.06);
    backdrop-filter: blur(0.6rem);
}

.subject-action-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
}

.subject-action-button {
    min-height: 2.9rem;
    padding-inline: 1.25rem;
    border-radius: 0.65rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
}

.subject-continue-button {
    order: 2;
    min-width: 8.5rem;
    color: var(--apparel-on-primary) !important;
    background: var(--store-primary) !important;
    box-shadow: 0 0.35rem 0.85rem rgba(0, 104, 56, 0.2) !important;
}

    .subject-continue-button:hover {
        background: var(--store-primary-hover) !important;
    }

    .subject-continue-button:disabled {
        color: rgba(255, 255, 255, 0.75) !important;
        background: var(--apparel-disabled) !important;
        box-shadow: none !important;
    }

.subject-cancel-button {
    order: 1;
    color: #35443b !important;
    background: var(--apparel-surface) !important;
    border: 1px solid var(--store-border-strong);
}

    .subject-cancel-button:hover {
        background: var(--store-surface-muted) !important;
    }

.subject-info-dialog button:focus-visible,
.subject-info-dialog input:focus-visible,
.subject-info-dialog [role="button"]:focus-visible {
    outline: 3px solid var(--apparel-border-green-strong);
    outline-offset: 2px;
}

@media screen and (max-width: 600px) {
    .subject-info-dialog {
        width: 100vw;
        max-width: 100vw;
        max-height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

        .subject-info-dialog::before {
            height: 0.25rem;
        }

    .subject-dialog-content {
        padding: 0;
    }

    .subject-info-card {
        min-height: 100%;
        padding: 1rem;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .subject-info-header {
        margin-bottom: 1rem;
    }

    .subject-field-item {
        padding: 0.35rem 0 !important;
    }

    .subject-action-bar {
        flex-direction: column;
        gap: 0.55rem;
        padding: 0.75rem 0.9rem calc(0.75rem + env(safe-area-inset-bottom));
    }

    .subject-action-button {
        width: 100%;
    }

    .subject-continue-button {
        order: 1;
    }

    .subject-cancel-button {
        order: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .subject-info-dialog *,
    .subject-info-dialog *::before,
    .subject-info-dialog *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
