/* =============================================================================
   FYSH — Description writing guide modal
   CR: fysh-description-guide-2026-09-26
   Premium help modal with an example property description and a
   copy to description action. CSP safe (no inline styles).
============================================================================= */

/* Trigger icon beside the description label */
.dg-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    padding: 0;
    vertical-align: middle;
    border: none;
    border-radius: 50%;
    background: var(--surface-2, #EEF2F8);
    color: var(--blue, #1E5BA8);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.dg-trigger:hover { background: var(--blue, #1E5BA8); color: #fff; }
.dg-trigger:focus-visible { outline: 2px solid var(--blue, #1E5BA8); outline-offset: 2px; }
.dg-trigger svg { width: 14px; height: 14px; }

/* Overlay + modal */
.dg-overlay {
    position: fixed;
    inset: 0;
    z-index: 9600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(10, 26, 48, 0.55);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.dg-overlay[hidden] { display: none; }
.dg-overlay.is-open { opacity: 1; }

body.dg-lock { overflow: hidden; }

.dg-modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(10, 26, 48, 0.35);
    transform: translateY(8px) scale(0.99);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font-body, sans-serif);
}
.dg-overlay.is-open .dg-modal { transform: none; }

.dg-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: var(--navy, #0F2340);
    border-bottom: 3px solid var(--gold, #C9A84C);
}
.dg-eyebrow {
    margin: 0 0 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.dg-title {
    margin: 0;
    font-family: var(--font-display, sans-serif);
    font-weight: 800;
    font-size: 18px;
    line-height: 1.25;
    color: #fff;
}
.dg-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s;
}
.dg-close:hover { background: rgba(255, 255, 255, 0.22); }

.dg-body {
    padding: 20px 24px;
    overflow-y: auto;
    color: #374151;
    font-size: 13.5px;
    line-height: 1.6;
}

.dg-tips p { margin: 0 0 10px; }
.dg-tiplist {
    margin: 0 0 4px;
    padding-left: 1.2em;
}
.dg-tiplist li { margin: 0 0 5px; }

.dg-example {
    margin-top: 16px;
    padding: 16px 18px;
    background: var(--surface-1, #F7F9FC);
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 4px;
    color: var(--navy, #0F2340);
}
.dg-example__label {
    margin: 0 0 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--faint, #9AA7B5);
}
.dg-example p { margin: 0 0 0.7em; font-size: 13px; line-height: 1.6; }
.dg-example p:last-child { margin-bottom: 0; }
.dg-example strong { color: var(--navy, #0F2340); }

.dg-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px;
    border-top: 1px solid var(--border, #E2E8F0);
    background: #fff;
}

@media (max-width: 520px) {
    .dg-header { padding: 16px; }
    .dg-body { padding: 16px; }
    .dg-footer { padding: 12px 16px; }
}
