/**
 * Vision Board Form Styles
 *
 * Inherits Poppins font and theme variables from Impreza.
 * Brand colors: #dc4797 (pink primary), #752776 (deep purple), #b02aac (links/hover), #f7941d (orange accent)
 */

/* ==========================================================================
   Layout: Two-Column Wrapper
   ========================================================================== */

.vision-form-wrapper {
    display: flex;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.vision-form-prompts {
    flex: 0 0 40%;
    max-width: 40%;
}

.vision-form-container {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
   Left Column: Writing Prompts
   ========================================================================== */

.vision-form-prompts-inner {
    background: #f5f5f5;
    border-radius: 3em;
    padding: 2.5rem;
}

.vision-form-prompts-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: #dc4797;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.vision-form-prompts-subheading {
    font-size: 1rem;
    color: #555;
    margin: 0 0 1.5rem;
    font-style: italic;
}

.vision-form-prompts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vision-form-prompts-list li {
    position: relative;
    padding: 0.6rem 0 0.6rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.vision-form-prompts-list li:last-child {
    border-bottom: none;
}

.vision-form-prompts-list li::before {
    content: "\f0eb"; /* Font Awesome lightbulb */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome;
    font-weight: 300;
    position: absolute;
    left: 0;
    top: 0.65rem;
    color: #dc4797;
    font-size: 0.9rem;
}

/* ==========================================================================
   Right Column: Form
   — Input, select, textarea, label, and heading styles are inherited from
     the Impreza theme for consistency with other plugin forms.
   ========================================================================== */

/* Fields — spacing only */
.vision-field {
    margin-bottom: 1.25rem;
}

.vision-field label {
    display: block;
    margin-bottom: 0.4rem;
}

.vision-field .required {
    color: var(--color-content-primary, #dc4797);
}

/* Ensure full-width inputs within the form */
.vision-form input[type="text"],
.vision-form textarea,
.vision-form select {
    width: 100%;
    box-sizing: border-box;
}

/* Textarea minimum height */
.vision-form textarea {
    min-height: 120px;
}

.vision-field-hint {
    font-size: 0.8rem;
    color: #888;
    margin: 0.3rem 0 0;
}

/* ==========================================================================
   Suggested Tag Pills
   ========================================================================== */

.vision-suggested-tags {
    margin-top: 0.6rem;
}

.vision-suggested-tags-label {
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 0.4rem;
}

.vision-suggested-tags-label span {
    color: #999;
    font-style: italic;
}

.vision-suggested-tags-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.vision-tag-pill {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-family: inherit;
    color: #752776;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.4;
}

.vision-tag-pill:hover {
    background: #f0e0f0;
    border-color: #dc4797;
}

.vision-tag-pill.is-active {
    background: #dc4797;
    border-color: #dc4797;
    color: #fff;
}

.vision-tag-pill.is-active:hover {
    background: #b02aac;
    border-color: #b02aac;
}

/* Character Counter */
.vision-char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.3rem;
}

.vision-char-counter.is-near-limit {
    color: #f7941d;
}

.vision-char-counter.is-at-limit {
    color: #d32f2f;
    font-weight: 600;
}

/* Consent Checkbox */
.vision-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 400 !important;
    cursor: pointer;
}

.vision-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: #fff;
    border: 2px solid #ccc !important;
    border-radius: 50% !important;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    /* Clear any theme-injected glyph before the input */
    font-family: inherit;
}

/* Neutralize any theme-injected checkmark glyphs (Impreza adds a ::before) */
.vision-checkbox-label input[type="checkbox"]::before,
.vision-checkbox-label input[type="checkbox"]::after {
    content: none;
    display: none;
}

.vision-checkbox-label input[type="checkbox"]:checked {
    background: #dc4797 !important;
    border-color: #dc4797 !important;
}

/* Our custom centered white checkmark — restored via :checked state only */
.vision-checkbox-label input[type="checkbox"]:checked::after {
    content: "" !important;
    display: block !important;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
    background: transparent;
}

/* Honeypot — visually hidden */
.vision-field--hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

/* Submit Button */
.vision-submit-btn {
    display: inline-block;
    padding: 0.85rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: #dc4797;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: 100%;
}

.vision-submit-btn:hover {
    background: #b02aac;
}

.vision-submit-btn:active {
    transform: scale(0.98);
}

.vision-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vision-submit-btn.is-loading {
    position: relative;
    color: transparent;
}

.vision-submit-btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vision-spin 0.6s linear infinite;
}

@keyframes vision-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Messages
   ========================================================================== */

.vision-message {
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    margin-top: 1.5rem;
}

.vision-message p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.vision-message--success {
    background: #fce4f0;
    border: 1px solid #dc4797;
    color: #752776;
}

.vision-message--error {
    background: #fce4ec;
    border: 1px solid #ef9a9a;
    color: #c62828;
}

/* Field-level validation errors — minimal override, theme handles base input styles */
.vision-field.has-error input,
.vision-field.has-error textarea,
.vision-field.has-error select {
    border-color: #d32f2f !important;
}

.vision-field-error {
    font-size: 0.8rem;
    color: #d32f2f;
    margin-top: 0.3rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .vision-form-wrapper {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem 0;
    }

    .vision-form-prompts {
        flex: none;
        max-width: 100%;
    }

    .vision-form-prompts-inner {
        padding: 1.5rem;
        border-radius: 1.5em;
    }

    .vision-form-prompts-heading {
        font-size: 1.3rem;
    }

    .vision-submit-btn {
        padding: 0.75rem 2rem;
    }
}
