/* =====================================================
   Custom Dialog — replaces native alert() / confirm()
   Brand colors: primary #7d9d43, secondary #FFB524
   ===================================================== */

.ifd-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: ifd-fade-in 0.15s ease;
}

.ifd-dialog {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22), 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 2rem 1.75rem 1.5rem;
    max-width: 320px;
    width: 100%;
    border-top: 4px solid #7d9d43;
    animation: ifd-slide-up 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Open Sans', system-ui, sans-serif;
}

.ifd-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
}

.ifd-icon-success {
    background: #eef5e3;
    color: #7d9d43;
}

.ifd-icon-error {
    background: #fde8e8;
    color: #dc3545;
}

.ifd-icon-warning {
    background: #fff8e6;
    color: #FFB524;
}

.ifd-icon-confirm {
    background: #fff8e6;
    color: #FFB524;
}

.ifd-icon-info {
    background: #eef5e3;
    color: #7d9d43;
}

.ifd-message {
    color: #1a1a1a;
    font-size: 0.975rem;
    line-height: 1.55;
    text-align: center;
    margin: 0 0 1.5rem;
}

.ifd-actions {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
}

.ifd-btn {
    flex: 1;
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.ifd-btn:active {
    transform: scale(0.97);
}

.ifd-btn-ok {
    background: #7d9d43;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(125, 157, 67, 0.35);
}

.ifd-btn-ok:hover {
    background: #5a7330;
    box-shadow: 0 4px 14px rgba(125, 157, 67, 0.45);
}

.ifd-btn-cancel {
    background: #f4f6f8;
    color: #555555;
    border: 1.5px solid #e0e3e7;
}

.ifd-btn-cancel:hover {
    background: #e8eaed;
}

/* Single-button alert: center and constrain width */
.ifd-actions-single .ifd-btn-ok {
    flex: 0 0 auto;
    min-width: 100px;
}

/* Animations */
@keyframes ifd-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes ifd-slide-up {
    from { transform: translateY(24px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}
