/* ===========================================================================
 * LOVE GRACEFULLY — shared form styles (new shortcode form system)
 * Shared by form.html (and any future per-destination template) via one file.
 * ======================================================================== */

.form-group {
    margin-bottom: 20px;
}
.lg-form input[type="text"],
.lg-form input[type="email"],
.lg-form input[type="tel"],
.lg-form input[type="number"],
.lg-form textarea,
.lg-form select,
.lg-form input[type="date"] {
    font-size: 20px;
    color: #999;
}
.lg-form label {
    font-size: 20px;
    font-weight: 700;
}
#char-count {
    font-size: 0.85em;
    font-weight: 300;
    color: #555;
    margin-top: 5px;
}
.lg-form textarea {
    border: 1px solid #d2d2d2;
    width: 100% !important;
    height: 150px;
    padding: 8px 15px;
    box-sizing: border-box;
    margin-right: 0;
    background-color: var(--form_bg_color);
    font-size: 20px;
    color: #999;
    border-width: var(--form_border_width-top) var(--form_border_width-right) var(--form_border_width-bottom) var(--form_border_width-left);
    border-color: var(--form_border_color);
    border-radius: var(--form_border_radius);
}
.lg-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    text-overflow: "";
    background: #fbfaf9;
    border: 1px solid #dadada;
    cursor: pointer;
    display: block;
    outline: 0;
    width: 100%;
    padding: 8px 15px;
    position: relative;
    text-indent: .01px;
    vertical-align: middle;
    z-index: 5;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    height: var(--form_input_height);
    background-color: var(--form_bg_color);
    border-width: var(--form_border_width-top) var(--form_border_width-right) var(--form_border_width-bottom) var(--form_border_width-left);
    border-color: var(--form_border_color);
    border-radius: var(--form_border_radius);
    font-size: 20px;
    color: #999;
}
.lg-form input[type="date"] {
    width: 150px !important;
    max-width: 100%;
}
.radio-wrapper {
    display: flex !important;
    gap: 20px;
    flex-wrap: nowrap;
    align-items: center;
}
.lg-form input[type="submit"] {
    display: inline-block;
    padding: 12px 32px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    /* Inherit Avada's button look where its vars exist, else use safe fallbacks
       so the button never collapses to an empty box. */
    background: var(--button_gradient_top_color, #c08497);
    color: var(--button_accent_color, #ffffff);
    border: 1px solid var(--button_border_color, transparent);
    border-radius: var(--button_border_radius, 4px);
}
.lg-form input[type="submit"]:hover {
    /* Use Avada's hover colours where defined, else darken the base. Always
       force a visible text colour so it never matches the background. */
    background-image: none;
    background-color: var(--button_gradient_top_color_hover, #a86c80);
    color: var(--button_accent_color_hover, #a86c80);
}

/* --- Honeypot: visually hidden, still in the DOM for bots ----------------- */
.lg-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Per-destination conditional blocks (hidden until JS reveals them) ---- */
[data-dest-only] {
    display: none;
}
[data-dest-only].is-visible {
    display: block;
}

/* --- Per-field messages (package / ceremony-type) ------------------------
 * These blocks are hidden CONTENT SOURCES: lg-form.js reads the one matching
 * the selected option and shows it in the #overlay modal (popup), like the
 * original form. Text comes from the template (generic) or LG_DEST_CONFIG
 * overrides (per destination). They are never displayed inline. */
.form-msg {
    display: none;
}
.form-msg p {
    margin-bottom: 1em;
}
.form-msg p:last-child {
    margin-bottom: 0;
}

/* The "up to N guests" notice is shown through the #overlay modal, not inline. */
.people-message {
    display: none;
}

/* --- Validation states --------------------------------------------------- */
.hide {
    display: none;
}
.lg-form input.errorform,
.lg-form select.errorform,
.lg-form textarea.errorform {
    border: 1px solid #CC0000 !important;
}
.lg-form label.errorform,
.errorform * {
    color: #CC0000 !important;
}
.field-error {
    color: #CC0000;
    font-size: 0.85em;
    margin-top: 4px;
}

/* --- Modal / overlay ----------------------------------------------------- */
#overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    align-items: center;
    justify-content: center;
}
#overlay.active { display: flex; }

.form-modal {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem;
    width: 100%;
    max-width: 600px;
    margin: 1rem;
    animation: pop-in 0.18s ease;
}

@keyframes pop-in {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.form-modal p {
    font-size: 18px;
    color: #333;
    line-height: 1.55;
    margin-bottom: 1.25rem;
}
.form-modal b { font-weight: 700; }

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-primary {
    padding: 8px 16px;
    font-size: 14px;
    font-family: inherit;
    border: none;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    cursor: pointer;
    transition: background 0.12s;
}
.btn-primary:hover { background: #333; }

/* --- Submit busy state --------------------------------------------------- */
.lg-form.is-sending input[type="submit"] {
    opacity: 0.6;
    pointer-events: none;
}
