/* ConstructionHub shared confirm / alert modal */
.ch-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.ch-dialog-root[hidden] {
    display: none !important;
}

.ch-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.ch-dialog-panel {
    position: relative;
    width: min(100%, 28rem);
    background: #fff;
    color: #0f172a;
    border-radius: 0.85rem;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transform: translateY(0);
    animation: ch-dialog-in 0.18s ease-out;
}

@keyframes ch-dialog-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ch-dialog-body {
    padding: 1.25rem 1.35rem 0.85rem;
}

.ch-dialog-title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.ch-dialog-message {
    margin: 0;
    font-size: 0.925rem;
    line-height: 1.5;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
}

.ch-dialog-input-wrap {
    margin-top: 0.85rem;
}

.ch-dialog-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.55rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.925rem;
    outline: none;
    box-sizing: border-box;
}

.ch-dialog-input:focus {
    border-color: rgb(var(--brand-primary-rgb, 1, 141, 18));
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb, 1, 141, 18), 0.18);
}

.ch-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    padding: 0.85rem 1.15rem 1.15rem;
}

.ch-dialog-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    padding: 0.5rem 0.95rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.25;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ch-dialog-btn:focus-visible {
    outline: 2px solid rgb(var(--brand-primary-rgb, 1, 141, 18));
    outline-offset: 2px;
}

.ch-dialog-btn-cancel {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

.ch-dialog-btn-cancel:hover {
    background: #f1f5f9;
}

.ch-dialog-btn-ok {
    background: rgb(var(--brand-primary-rgb, 1, 141, 18));
    color: #fff;
}

.ch-dialog-btn-ok:hover {
    filter: brightness(0.95);
}

.ch-dialog-btn-danger {
    background: #dc2626;
    color: #fff;
}

.ch-dialog-btn-danger:hover {
    background: #b91c1c;
}

body.ch-dialog-open {
    overflow: hidden;
}
