/* ============================================================
   DoEasy Popup Maker — Frontend Styles
   Pixel-perfect match to doeasy.pt modal design
   ============================================================ */

/* ── Overlay ── */
.depm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: var(--depm-overlay-bg, rgba(0, 0, 0, 0.50));
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    /* fade-in animation trigger */
    opacity: 0;
    transition: opacity 0.22s ease;
}

.depm-overlay.depm-active {
    display: flex;
}

.depm-overlay.depm-visible {
    opacity: 1;
}

/* ── Modal container ── */
.depm-modal {
    background: #ffffff;
    border-radius: 0;                   /* doeasy modals are sharp-cornered */
    width: 100%;
    max-width: 470px;                   /* matches screenshot width */
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    transform: translateY(12px);
    transition: transform 0.22s ease;
    position: relative;
    font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

.depm-overlay.depm-visible .depm-modal {
    transform: translateY(0);
}

/* ── Header ── */
.depm-modal-header {
    padding: 22px 28px 16px 28px;
    border-bottom: 1px solid var(--depm-border-color, #808080b3);
    flex-shrink: 0;
}

.depm-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    letter-spacing: 0;
    font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

/* ── Scrollable body ── */
.depm-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    padding: 0 28px;
    /* Scrollbar styling - subtle like the screenshot */
    scrollbar-width: thin;
    scrollbar-color: #cccccc transparent;
}

.depm-modal-body::-webkit-scrollbar {
    width: 6px;
}
.depm-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.depm-modal-body::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 3px;
}
.depm-modal-body::-webkit-scrollbar-thumb:hover {
    background: #aaaaaa;
}

/* ── Content typography — matches doeasy.pt ── */
.depm-modal-content {
    padding: 4px 0 18px 0;
    font-size: 14px;
    line-height: 1.65;
    color: #333333;
}

.depm-modal-content p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.65;
    color: #333333;
}

.depm-modal-content p:last-child {
    margin-bottom: 0;
}

/* Numbered headings like "1. Responsável pelo tratamento..." */
.depm-modal-content ol,
.depm-modal-content ul {
    padding-left: 0;
    margin: 0 0 10px 0;
    list-style: none;
}

.depm-modal-content li {
    padding-left: 14px;
    position: relative;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.65;
    color: #333333;
}

.depm-modal-content li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: #333333;
}

/* Bold headings inside content */
.depm-modal-content h1,
.depm-modal-content h2,
.depm-modal-content h3,
.depm-modal-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 14px 0 4px 0;
    line-height: 1.4;
}

.depm-modal-content strong,
.depm-modal-content b {
    font-weight: 700;
    color: #1a1a1a;
}

.depm-modal-content a {
    color: #c8a84b;
    text-decoration: none;
}

.depm-modal-content a:hover {
    text-decoration: underline;
}

/* "A. Funcionalidades deste Website" style headings */
.depm-modal-content .depm-section-heading {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a1a;
    display: block;
    margin: 12px 0 4px;
}

/* ── Footer / OK button row ── */
.depm-modal-footer {
    padding: 14px 28px 20px 28px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    border-top: 1px solid var(--depm-border-color, #808080b3);
}

/* OK button — matches screenshot exactly: rounded-ish, dark text, outlined */
.depm-btn-ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 36px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--depm-btn-color, #1a1a2e);
    background: transparent;
    border: 1px solid var(--depm-btn-color, #1a1a2e);
    border-radius: 0;
    cursor: pointer;
    font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
    transition: background 0.15s ease, color 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.depm-btn-ok:hover,
.depm-btn-ok:focus {
    background: var(--depm-btn-color, #1a1a2e);
    color: #ffffff;
    outline: none;
}

/* ── Scrollbar indicator — right edge line as in screenshot ── */
.depm-modal-body:has(::-webkit-scrollbar-thumb) {
    border-right: 6px solid transparent;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .depm-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .depm-modal {
        max-width: 100% !important;
        max-height: 90vh;
        border-radius: 0;
    }

    .depm-modal-header {
        padding: 18px 18px 12px 18px;
    }

    .depm-modal-title {
        font-size: 16px;
    }

    .depm-modal-body {
        padding: 0 18px;
    }

    .depm-modal-footer {
        padding: 12px 18px 16px 18px;
    }
}

@media (max-width: 400px) {
    .depm-modal-header {
        padding: 14px 14px 10px 14px;
    }
    .depm-modal-body {
        padding: 0 14px;
    }
    .depm-modal-footer {
        padding: 10px 14px 14px 14px;
    }
}
