/* ========================================
   CUSTOM DIALOG SYSTEM — EURO APAVOL
   Design: Teal/Slate · DM Sans · Glass
   ======================================== */

/* ── Overlay ──────────────────────────── */

.apd-overlay {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0);
    backdrop-filter: blur(0px);
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    overflow-y: auto;
}

.apd-overlay.apd-visible {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}

/* ── Card ─────────────────────────────── */

.apd-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow:
        0 25px 60px -12px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 420px;
    padding: 36px 32px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;

    /* Animare intrare */
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    animation: apd-slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

@keyframes apd-slideUp {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Icon ring ────────────────────────── */

.apd-icon-ring {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.apd-icon-ring svg {
    width: 28px;
    height: 28px;
}

/* ── Title ────────────────────────────── */

.apd-title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

/* ── Body ─────────────────────────────── */

.apd-body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: #64748b;
    line-height: 1.65;
    margin: 4px 0 8px;
    max-width: 360px;
    word-break: break-word;
}

/* ── Input ────────────────────────────── */

.apd-input-wrap {
    width: 100%;
    margin: 8px 0 4px;
}

.apd-input {
    width: 100%;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    outline: none;
    transition: all 0.2s ease;
    text-align: center;
}

.apd-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.apd-input:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.apd-input:focus {
    border-color: var(--accent, #0d9488);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

/* ── Actions ──────────────────────────── */

.apd-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
    justify-content: center;
}

/* ── Buttons ──────────────────────────── */

.apd-btn {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 110px;
    letter-spacing: 0.01em;
}

.apd-btn:active {
    transform: scale(0.97);
}

/* Primary */
.apd-btn-primary {
    color: #ffffff;
    box-shadow: none;
    border: 1.5px solid transparent;
}

.apd-btn-primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.apd-btn-primary:active {
    transform: translateY(0) scale(0.97);
}

/* Ghost */
.apd-btn-ghost {
    background: transparent;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}

.apd-btn-ghost:hover {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

/* ── Responsive ───────────────────────── */

@media (max-width: 480px) {
    .apd-card {
        padding: 28px 20px 24px;
        max-width: 100%;
        border-radius: 16px;
    }

    .apd-actions {
        flex-direction: column-reverse;
    }

    .apd-btn {
        width: 100%;
        min-width: unset;
    }

    .apd-icon-ring {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .apd-icon-ring svg {
        width: 24px;
        height: 24px;
    }

    .apd-title {
        font-size: 16px;
    }

    .apd-body {
        font-size: 13px;
    }
}

/* ── Print: hide dialogs ──────────────── */

@media print {
    .apd-overlay {
        display: none !important;
    }
}