/* design_system/modal.css — HTML5 dialog modal */

.modal-dialog {
    margin: auto;
    border: none;
    border-radius: 14px;
    padding: 0;
    width: min(640px, 92vw);
    max-height: 90vh;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    color: var(--color-text);
}
.modal-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}
.modal-dialog[open] {
    animation: modal-fade-in 0.15s ease-out;
}
@keyframes modal-fade-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    color: var(--color-text-muted);
    transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--color-bg-alt); color: var(--color-accent); }
.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-alt);
    margin: 1.25rem -1.25rem -1.25rem;
}
.modal-errors {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(192, 57, 43, 0.35);
    background: rgba(192, 57, 43, 0.06);
    border-radius: 8px;
    color: var(--red);
    font-size: 0.9rem;
}
.modal-errors ul { margin: 0.35rem 0 0; padding-left: 1.25rem; }

.modal-estimated-cost-line {
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

@media (max-width: 1024px) {
    .board-row {
        grid-template-columns: 28px 32px minmax(160px, 1fr) 110px 80px 80px 110px 80px 72px;
        column-gap: 0.35rem;
    }
    .board-row--with-extra-columns {
        grid-template-columns:
            28px
            32px
            minmax(160px, 2fr)
            minmax(110px, 1fr)
            minmax(90px, 1fr)
            minmax(90px, 1fr)
            minmax(110px, 1fr)
            minmax(80px, 1fr)
            72px;
        column-gap: clamp(0.35rem, 1.2vw, 0.75rem);
    }
    .board-row--minimal-columns {
        grid-template-columns:
            28px
            32px
            minmax(200px, 3fr)
            minmax(120px, 1.3fr)
            minmax(120px, 1.3fr)
            72px;
        column-gap: clamp(0.35rem, 1.6vw, 0.9rem);
    }
}
@media (max-width: 768px) {
    .board-row { grid-template-columns: 28px 32px 1fr 90px 70px 70px 90px 68px 64px; }
    .board-row .cell-priority,
    .board-row .cell-time,
    .board-row--task .cell-cost { font-size: 0.85rem; }
}

/* ========== RESPONSIVE ========== */
