/* ================================================
   FormClups — front-end styles
   Light "card" layout (Clusterclups reference),
   fully themeable via CSS custom properties set per
   form container by FC_Layout (global + per-form).
   ================================================ */

.fc-scope {
    --fc-font-sans: Arial, Helvetica, sans-serif;
    display: block;
    /* Some themes apply a border to column children; the FormClups wrapper
       must never show one (it appeared as a stray white ring around the card). */
    border: 0 !important;
}

/* --- Container card --- */
.fc-glass-panel {
    font-family: var(--fc-font-sans);
    box-sizing: border-box;
    background: var(--fc-box-bg, #fff5ff);
    -webkit-backdrop-filter: blur(var(--fc-box-blur, 0px));
    backdrop-filter: blur(var(--fc-box-blur, 0px));
    border: 1px solid var(--fc-box-border, transparent);
    box-shadow: 0 10px 25px rgba(14, 35, 73, 0.1);
    border-radius: var(--fc-box-radius, 30px);
    padding: var(--fc-box-padding, 40px);
    width: 100%;
    max-width: var(--fc-box-max-width, 600px);
    margin: 0 auto;
    color: var(--fc-field-text, #333);
}
.fc-glass-panel *, .fc-glass-panel *::before, .fc-glass-panel *::after {
    box-sizing: border-box; margin: 0; padding: 0;
}

/* --- Header (optional) --- */
.fc-form-header { text-align: center; margin-bottom: 24px; }
.fc-form-header h2 { font-weight: 800; font-size: 1.6rem; color: var(--fc-heading-color, #0e2349); margin-bottom: 8px; }
.fc-form-header p { font-size: 0.95rem; color: var(--fc-muted-color, #0e2349); opacity: .8; line-height: 1.4; }

/* --- Layout --- */
.fc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fc-col-full { grid-column: 1 / -1; }
.fc-col-half { grid-column: span 1; }
.fc-form > .fc-fade-in:last-of-type, .fc-form > .fc-error { grid-column: 1 / -1; }

/* --- Labels --- */
.fc-label { display: block; font-size: 16px; font-weight: bold; color: var(--fc-heading-color, #0e2349); margin-bottom: 8px; text-align: left; }
.fc-req { color: var(--fc-heading-color, #0e2349); }

/* --- Inputs --- */
.fc-input, .fc-textarea, .fc-select {
    width: 100%;
    padding: 12px 15px;
    border: var(--fc-field-border-width, 2px) solid var(--fc-field-border, #0e2349);
    border-radius: var(--fc-field-radius, 10px);
    font-size: 16px;
    color: var(--fc-field-text, #333);
    background-color: var(--fc-field-bg, #fff);
    font-family: var(--fc-font-sans);
    outline: none;
    transition: border-color .3s, background-color .3s;
}
.fc-input::placeholder, .fc-textarea::placeholder { color: var(--fc-field-placeholder, #9aa0ac); }
.fc-input:focus, .fc-textarea:focus, .fc-select:focus {
    border-color: var(--fc-accent, #d476d3);
    background-color: var(--fc-accent-focus-bg, #fff);
}
.fc-textarea { min-height: 120px; resize: vertical; }

/* Select with custom arrow */
.fc-select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none; cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath fill='none' stroke='%230e2349' stroke-width='2' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px 8px;
    line-height: 1.3;
}
.fc-select option { background: #fff; color: var(--fc-field-text, #333); }
.fc-select:invalid, .fc-select option[value=""] { color: var(--fc-field-placeholder, #9aa0ac); }

/* Custom dropdown (coherent with the form fields) */
.fc-dd { position: relative; }
.fc-dd-native { position: absolute !important; opacity: 0 !important; width: 1px; height: 1px; pointer-events: none; }
.fc-dd-trigger { text-align: left; }
.fc-dd-trigger.is-placeholder { color: var(--fc-field-placeholder, #9aa0ac); }
.fc-dd-panel {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60;
    background: var(--fc-field-bg, #fff);
    border: var(--fc-field-border-width, 2px) solid var(--fc-accent, #d476d3);
    border-radius: var(--fc-field-radius, 10px);
    overflow: hidden; box-shadow: 0 8px 24px rgba(14, 35, 73, 0.18);
}
.fc-dd.open .fc-dd-panel { display: block; }
.fc-dd-opt { padding: 12px 15px; font-size: 16px; color: var(--fc-field-text, #333); cursor: pointer; transition: background .12s, color .12s; }
.fc-dd-opt:hover, .fc-dd-opt.is-selected { background: var(--fc-accent, #d476d3); color: #fff; }
.fc-dd-opt.is-placeholder { color: var(--fc-field-placeholder, #9aa0ac); }

/* Error state on a field */
.fc-input-error { border-color: var(--fc-error-color, #ff4d4d) !important; background-color: #fff0f0 !important; }

/* --- Custom checkbox (consent / newsletter) --- */
.fc-privacy { display: flex; align-items: flex-start; gap: 13px; margin: 0 0 15px; }
.fc-checkbox-wrap { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.fc-checkbox {
    height: 22px; width: 22px; cursor: pointer; appearance: none; -webkit-appearance: none;
    border-radius: 6px; border: 2px solid var(--fc-heading-color, #0e2349); background: #fff; transition: all .2s;
}
.fc-checkbox:hover { border-color: var(--fc-accent, #d476d3); }
.fc-checkbox:checked { background: var(--fc-heading-color, #0e2349); border-color: var(--fc-heading-color, #0e2349); }
.fc-checkmark { position: absolute; left: 5px; top: 5px; width: 12px; height: 12px; opacity: 0; pointer-events: none; color: #fff; transition: opacity .2s; }
.fc-checkbox:checked + .fc-checkmark { opacity: 1; }
.fc-privacy label { font-size: 16px; color: var(--fc-heading-color, #0e2349); cursor: pointer; user-select: none; line-height: 1.4; text-align: left; }
.fc-privacy label a { color: var(--fc-heading-color, #0e2349); text-decoration: underline; font-weight: bold; }

/* --- Choice groups (radio / multi checkbox) --- */
.fc-choice-group { display: flex; flex-direction: column; gap: 10px; }
.fc-choice { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 16px; color: var(--fc-heading-color, #0e2349); }
.fc-choice-input { accent-color: var(--fc-heading-color, #0e2349); width: 18px; height: 18px; cursor: pointer; }
.fc-choice-label a { color: var(--fc-heading-color, #0e2349); text-decoration: underline; font-weight: bold; }

/* --- Honeypot --- */
.fc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Neutralize empty <p>/<br> that WordPress' wpautop may inject around the
   shortcode output (e.g. inside the Shortcode block) so they never occupy a
   grid cell or add stray spacing. */
.fc-scope p:empty { display: none !important; }
.fc-form > p:empty, .fc-form > br { display: none !important; }

/* --- Submit area --- */
.fc-submit-wrap { text-align: center; }
.fc-required-note { text-align: center; font-size: 14px; color: var(--fc-muted-color, #0e2349); margin: 0 0 15px; }
.fc-submit {
    width: 100%; max-width: 250px; display: block; margin: 0 auto;
    padding: 13px 24px; font-size: 19px; font-weight: 800; line-height: 1.2; border: none;
    border-radius: var(--fc-submit-radius, 10px); cursor: pointer;
    background-color: var(--fc-submit-bg, #0e2349); color: var(--fc-submit-text, #fff);
    font-family: var(--fc-font-sans); transition: all .3s;
}
.fc-submit:hover { background-color: var(--fc-submit-hover-bg, #d476d3); color: var(--fc-submit-hover-text, #fff); transform: translateY(-2px); }
.fc-submit.fc-locked { background-color: var(--fc-submit-locked-bg, #4b5563); color: var(--fc-submit-locked-text, #d1d5db); cursor: not-allowed; }
.fc-submit:disabled { cursor: not-allowed; transform: none; opacity: .9; }
.fc-submit.fc-btn-success { background-color: var(--fc-success-color, #28a745) !important; }

/* --- Error --- */
.fc-error { color: var(--fc-error-color, #ff4d4d); font-size: 14px; font-weight: bold; text-align: center; margin-top: 10px; }

/* --- Success panel (only for "message" mode) --- */
.fc-success { text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 24px; }
.fc-success-icon { width: 80px; height: 80px; background: color-mix(in srgb, var(--fc-success-color, #28a745) 18%, transparent); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; border: 2px solid var(--fc-success-color, #28a745); }
.fc-success-icon svg { width: 40px; height: 40px; color: var(--fc-success-color, #28a745); }
.fc-success h2 { font-weight: 800; font-size: 1.6rem; color: var(--fc-heading-color, #0e2349); margin-bottom: 16px; }
.fc-success p { color: var(--fc-muted-color, #0e2349); opacity: .85; font-size: 1rem; margin-bottom: 28px; line-height: 1.6; max-width: 360px; }
.fc-visit-btn { display: inline-block; padding: 15px 40px; background: var(--fc-submit-bg, #0e2349); color: var(--fc-submit-text, #fff); font-weight: 800; border-radius: var(--fc-submit-radius, 10px); text-align: center; text-decoration: none; transition: all .3s; }
.fc-visit-btn:hover { background: var(--fc-submit-hover-bg, #d476d3); color: var(--fc-submit-hover-text, #fff); transform: translateY(-2px); }

/* --- Animations --- */
.fc-fade-in { opacity: 0; animation: fc-fade-in .3s ease-out forwards; }
@keyframes fc-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fc-submitting { display: inline-block; }

/* --- Responsive --- */
@media (max-width: 600px) {
    .fc-glass-panel { padding: 20px; }
    .fc-form { grid-template-columns: 1fr; gap: 0; }
    .fc-field, .fc-col-half, .fc-col-full { grid-column: 1 / -1; margin-bottom: 20px; }
}
