/* ============================================================
   Ghost Hunters Map — Forms & Dashboard
   ============================================================ */

/* ---------- Wrapper ---------- */
.ghm-form-wrap {
    width: 100%;
    max-width: 540px;
    margin-inline: auto;
}

/* ---------- Form ---------- */
.ghm-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.ghm-form__group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.ghm-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

@media (max-width: 480px) {
    .ghm-form__row {
        grid-template-columns: 1fr;
    }
}

.ghm-form__group--inline {
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ---------- Labels ---------- */
.ghm-form label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

.ghm-form label span[aria-hidden] {
    color: #e05555;
    margin-left: 2px;
}

/* ---------- Inputs & Textarea ---------- */
.ghm-form input[type="text"],
.ghm-form input[type="email"],
.ghm-form input[type="password"],
.ghm-form input[type="url"],
.ghm-form input[type="number"],
.ghm-form textarea {
    width: 100%;
    background-color: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.625rem 0.875rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
}

.ghm-form input[type="text"]:focus,
.ghm-form input[type="email"]:focus,
.ghm-form input[type="password"]:focus,
.ghm-form input[type="url"]:focus,
.ghm-form input[type="number"]:focus,
.ghm-form textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.ghm-form textarea {
    resize: vertical;
    min-height: 120px;
}

.ghm-form input[type="checkbox"] {
    accent-color: var(--color-accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ghm-form__hint {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/* ---------- Button (form context overrides) ---------- */
.ghm-form .ghm-btn {
    margin-top: var(--spacing-xs);
    align-self: flex-start;
}

/* ---------- Errors ---------- */
.ghm-form__errors {
    list-style: none;
    background-color: rgba(224, 85, 85, 0.12);
    border: 1px solid rgba(224, 85, 85, 0.4);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md);
    color: #f09090;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* ---------- Notices ---------- */
.ghm-notice {
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.ghm-notice--success {
    background-color: rgba(85, 180, 110, 0.12);
    border-color: rgba(85, 180, 110, 0.4);
    color: #90d4a4;
}

/* ---------- Footer link ---------- */
.ghm-form__footer {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* ---------- Dashboard ---------- */
.ghm-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.ghm-dashboard .ghm-form-wrap {
    max-width: 100%;
}

.ghm-dashboard__status {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ---------- Status badge ---------- */
.ghm-status {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    border: 1px solid currentColor;
}

.ghm-status--pending {
    color: #f0c060;
    border-color: rgba(240, 192, 96, 0.4);
    background-color: rgba(240, 192, 96, 0.08);
}

.ghm-status--publish {
    color: #90d4a4;
    border-color: rgba(144, 212, 164, 0.4);
    background-color: rgba(144, 212, 164, 0.08);
}

.ghm-status--draft {
    color: var(--color-text-muted);
    border-color: var(--color-border);
}

/* ---------- Logout link ---------- */
.ghm-logout-link {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* ---------- Logo upload ---------- */
.ghm-form__current-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.ghm-form__logo-preview {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.ghm-form input[type="file"] {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    cursor: pointer;
}

.ghm-form input[type="file"]::file-selector-button {
    background-color: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.82rem;
    padding: 4px 12px;
    margin-right: 10px;
    cursor: pointer;
    transition: border-color var(--transition);
}

.ghm-form input[type="file"]::file-selector-button:hover {
    border-color: var(--color-accent);
}

/* ---------- Equipment checkboxes ---------- */
.ghm-form__checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--spacing-xs) var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.ghm-form__checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--color-text);
    cursor: pointer;
    font-weight: 400;
}

.ghm-form__checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
}

/* ---------- Social links grid ---------- */
.ghm-form__social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.ghm-form__group--social label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

/* ---------- Fieldset reset ---------- */
.ghm-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.ghm-form fieldset legend {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.02em;
    margin-bottom: var(--spacing-xs);
    float: left;
    width: 100%;
}

/* ---------- Submit form (full-width, no max-width constraint) ---------- */
.ghm-form-submit {
    width: 100%;
}

/* ============================================================
   Auth pages (register / login) — full-page split layout
   ============================================================ */

.ghm-auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.ghm-auth-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ---------- Brand panel (left) ---------- */
.ghm-auth-brand {
    background-color: var(--color-bg-surface);
    border-right: 1px solid var(--color-border);
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.ghm-auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(86, 173, 191, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(86, 173, 191, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.ghm-auth-brand__logo {
    font-size: clamp(2rem, 3.5vw, 4rem);
    position: relative;
    flex-wrap: wrap;
}

.ghm-auth-brand__logo .ghm-logo__img {
    width: clamp(40px, 4vw, 56px);
    height: clamp(40px, 4vw, 56px);
}

@media (max-width: 768px) {
    .ghm-auth-brand__logo {
        font-size: 2rem;
    }
    .ghm-auth-brand__logo .ghm-logo__img {
        width: 36px;
        height: 36px;
    }
}

.ghm-auth-brand__copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-lg);
    position: relative;
}

.ghm-auth-brand__title {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 700;
    color: var(--color-ghost-white);
    line-height: 1.2;
    margin: 0;
}

.ghm-auth-brand__sub {
    font-size: 1rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin: 0;
    max-width: 400px;
}

.ghm-auth-brand__benefits {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.ghm-auth-brand__benefits li {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ghm-auth-brand__benefits li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-accent);
    flex-shrink: 0;
}

.ghm-auth-brand__count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0;
    position: relative;
}

/* ---------- Form panel (right) ---------- */
.ghm-auth-form-panel {
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
}

.ghm-auth-form-panel__inner {
    width: 100%;
    max-width: 420px;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .ghm-auth-page {
        grid-template-columns: 1fr;
    }

    .ghm-auth-brand {
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
    }

    .ghm-auth-brand__copy {
        gap: var(--spacing-md);
    }

    .ghm-auth-brand__title {
        font-size: 1.4rem;
    }

    .ghm-auth-brand__sub,
    .ghm-auth-brand__benefits {
        display: none;
    }

    .ghm-auth-form-panel {
        padding: var(--spacing-lg);
        align-items: flex-start;
    }
}

/* ---------- Profile completion ---------- */
.ghm-profile-completion {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.ghm-profile-completion__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ghm-profile-completion__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.ghm-profile-completion__percent {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-ghost-white);
}

.ghm-profile-completion__bar {
    height: 6px;
    background-color: var(--color-bg-elevated);
    border-radius: 99px;
    overflow: hidden;
}

.ghm-profile-completion__fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s ease;
}

.ghm-profile-completion__fill--basic    { background-color: #666; }
.ghm-profile-completion__fill--active   { background-color: #f0c060; }
.ghm-profile-completion__fill--verified { background-color: var(--color-accent); }
.ghm-profile-completion__fill--elite    { background: linear-gradient(90deg, var(--color-accent), #a78bfa); }

.ghm-profile-completion__missing {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.ghm-profile-completion__missing summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text);
    list-style: none;
    user-select: none;
}

.ghm-profile-completion__missing summary::-webkit-details-marker {
    display: none;
}

.ghm-profile-completion__missing summary::before {
    content: '\25B8  ';
    font-size: 0.7rem;
}

details[open].ghm-profile-completion__missing summary::before {
    content: '\25BE  ';
}

.ghm-profile-completion__missing ul {
    list-style: disc;
    padding-left: var(--spacing-md);
    margin-top: var(--spacing-xs);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ghm-profile-completion__done {
    font-size: 0.82rem;
    color: #90d4a4;
    margin: 0;
}

/* Share modal */
.ghm-share-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ghm-share-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.ghm-share-modal__box {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 380px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.ghm-share-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
}

.ghm-share-modal__close:hover { color: var(--color-text); }

.ghm-share-modal__box h3 {
    margin: 0;
    font-size: 1.2rem;
    font-family: var(--font-title);
    color: var(--color-accent);
}

.ghm-share-modal__box p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.ghm-share-modal__fb-btn {
    background-color: #1877f2;
    border-color: #1877f2;
    color: #fff;
    text-decoration: none;
    width: 100%;
    justify-content: center;
}

.ghm-share-modal__fb-btn:hover {
    background-color: #0d65d9;
    border-color: #0d65d9;
    color: #fff;
}

.ghm-share-modal__later {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.ghm-share-modal__later:hover { color: var(--color-text); }

/* ============================================================
   Remove listing page
   ============================================================ */

.ghm-remove-listing__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--spacing-md);
}

.ghm-remove-listing__intro {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
    margin: 0 0 var(--spacing-sm);
}

.ghm-remove-listing__warn {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0 0 var(--spacing-lg);
}

.ghm-remove-listing__actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.ghm-remove-listing__confirm {
    border-color: #e05555;
    color: #e05555;
}

.ghm-remove-listing__confirm:hover {
    background-color: #e05555;
    border-color: #e05555;
    color: #fff;
    box-shadow: 0 0 16px rgba(224, 85, 85, 0.35);
}

.ghm-remove-listing__done {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.ghm-remove-listing__done-title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.ghm-remove-listing__done-sub {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.85;
}

.ghm-remove-listing__back {
    align-self: flex-start;
    margin-top: var(--spacing-xs);
}
