/**
 * Take Down Braids — custom alert / confirm / prompt dialogs
 */
.tdb-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tdb-dialog-root.is-open {
    display: flex;
}

.tdb-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 19, 46, 0.58);
    backdrop-filter: blur(2px);
}

.tdb-dialog-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(10, 19, 46, 0.22);
    overflow: hidden;
    animation: tdbDialogIn 0.22s ease;
}

.tdb-dialog-card--prompt {
    max-width: 480px;
}

@keyframes tdbDialogIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tdb-dialog-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.15rem 1.25rem 0.85rem;
    background: linear-gradient(135deg, #965b07 0%, #5a3704 100%);
    color: #fff;
}

.tdb-dialog-header--danger {
    background: linear-gradient(135deg, #b42318 0%, #7a1a12 100%);
}

.tdb-dialog-header--success {
    background: linear-gradient(135deg, #0d7a4d 0%, #065a38 100%);
}

.tdb-dialog-header--warning {
    background: linear-gradient(135deg, #b45309 0%, #7c3a06 100%);
}

.tdb-dialog-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.tdb-dialog-title-wrap {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.tdb-dialog-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.tdb-dialog-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.tdb-dialog-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.tdb-dialog-body {
    padding: 1.15rem 1.25rem 0.25rem;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.55;
}

.tdb-dialog-message {
    margin: 0;
    white-space: pre-line;
}

.tdb-dialog-input-wrap.hidden {
    display: none;
}

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

.tdb-dialog-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tdb-dialog-input:focus {
    outline: none;
    border-color: #965b07;
    box-shadow: 0 0 0 3px rgba(150, 91, 7, 0.15);
}

.tdb-dialog-footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1rem 1.25rem 1.15rem;
}

.tdb-dialog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.tdb-dialog-btn:active {
    transform: scale(0.98);
}

.tdb-dialog-btn--primary {
    background: #705907;
    color: #fff;
}

.tdb-dialog-btn--primary:hover {
    background: #5a4706;
}

.tdb-dialog-btn--danger {
    background: #b42318;
    color: #fff;
}

.tdb-dialog-btn--danger:hover {
    background: #991b1b;
}

.tdb-dialog-btn--ghost {
    background: #f3f4f6;
    color: #374151;
}

.tdb-dialog-btn--ghost:hover {
    background: #e5e7eb;
}
