/* Professional-profile request dialog (templates/partials/profile_dialog.html).
   Shared by the homepage and the About page, which name their colour tokens
   differently, so the dialog carries its own light/dark palette. */
.profile-dialog {
    --pd-bg:            #f4f5f7;
    --pd-surface:       #ffffff;
    --pd-border:        rgba(0,0,0,0.08);
    --pd-border-active: rgba(221,122,34,0.3);
    --pd-text:          #1a2030;
    --pd-text-dim:      #5a6478;
    --pd-text-muted:    #8b95a8;
    --pd-accent:        #dd7a22;
    --pd-accent-glow:   rgba(221,122,34,0.08);
    --pd-ease:          cubic-bezier(0.22, 1, 0.36, 1);
}
[data-theme="dark"] .profile-dialog {
    --pd-bg:            #0b0e13;
    --pd-surface:       #12161e;
    --pd-border:        rgba(255,255,255,0.06);
    --pd-border-active: rgba(245,168,58,0.25);
    --pd-text:          #e8ecf1;
    --pd-text-dim:      #7a8599;
    --pd-text-muted:    #4a5568;
    --pd-accent:        #f5a83a;
    --pd-accent-glow:   rgba(245,168,58,0.12);
}

.profile-dialog {
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--pd-border);
    border-radius: 12px;
    background: var(--pd-surface);
    color: var(--pd-text);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    text-align: left;
    box-shadow: 0 18px 48px rgba(0,0,0,0.28);
}
.profile-dialog::backdrop { background: rgba(8,10,14,0.55); }
.profile-dialog[open] { animation: pdIn 0.25s var(--pd-ease); }
@keyframes pdIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.profile-dialog :focus-visible {
    outline: 2px solid var(--pd-accent);
    outline-offset: 2px;
}

.profile-dialog-body { position: relative; padding: 28px 28px 24px; }

.pd-label {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--pd-accent);
}

.profile-dialog h2 {
    font-family: 'DM Serif Display', 'Fraunces', Georgia, serif;
    font-weight: 400;
    font-size: 1.45rem;
    line-height: 1.25;
    text-transform: none;
    margin: 6px 36px 10px 0;
    color: var(--pd-text);
}

.profile-dialog-text {
    font-size: 14px;
    line-height: 1.65;
    font-weight: 300;
    color: var(--pd-text-dim);
    margin: 0 0 20px;
}

.profile-dialog-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--pd-border);
    background: transparent;
    color: var(--pd-text-dim);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}
.profile-dialog-close:hover { color: var(--pd-accent); border-color: var(--pd-border-active); }

.profile-field label {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--pd-text-dim);
    margin-bottom: 8px;
}
.profile-field input {
    width: 100%;
    box-sizing: border-box;
    font: 400 16px/1.4 'IBM Plex Sans', sans-serif; /* 16px: no zoom-on-focus on iOS */
    color: var(--pd-text);
    background: var(--pd-bg);
    border: 1px solid var(--pd-border);
    border-radius: 8px;
    padding: 11px 12px;
    transition: border-color 0.3s;
}
.profile-field input::placeholder { color: var(--pd-text-muted); }
.profile-field input:focus { outline: none; border-color: var(--pd-accent); box-shadow: 0 0 0 3px var(--pd-accent-glow); }
.profile-field input[aria-invalid="true"] { border-color: #d9534f; }

.profile-error { min-height: 20px; margin: 8px 0 0; font-size: 13px; color: #d9534f; }
.profile-error:empty { min-height: 0; margin-top: 0; }
.profile-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.pd-send,
.pd-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.3px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}
.pd-send {
    width: 100%;
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid var(--pd-accent);
    background: var(--pd-accent);
    color: #0b0e13;
}
.pd-send:hover { filter: brightness(1.08); }
.pd-send[disabled] { opacity: 0.7; cursor: progress; }
.pd-btn {
    display: inline-block;
    margin-top: 22px;
    padding: 9px 16px;
    border: 1px solid var(--pd-border);
    background: var(--pd-surface);
    color: var(--pd-text);
}
.pd-btn:hover { color: var(--pd-accent); border-color: var(--pd-border-active); }

.profile-privacy { margin: 14px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--pd-text-muted); }
.profile-privacy a { color: var(--pd-text-dim); }
.profile-privacy a:hover { color: var(--pd-accent); }

.profile-done p:not(.pd-label) { font-size: 14px; line-height: 1.65; color: var(--pd-text-dim); margin: 0; }
.profile-done p:not(.pd-label) + p { margin-top: 6px; }

@media (max-width: 600px) {
    .profile-dialog-body { padding: 24px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .profile-dialog[open] { animation: none; }
}
