/* ============================================================
   Wholesale Form System – style.css
   Author: Jayed Hosen | https://softsolo.com/
   ============================================================ */

/* ---------- Accessibility-only label hiding ---------- */
.wfs-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Container ---------- */
.wfs-form-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2d3436;
    box-sizing: border-box;
}

/* Hide the form header block (title / product info) */
.wfs-form-header {
    display: none !important;
}

/* ---------- Grid layout ---------- */
.wfs-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

/* ---------- Form groups ---------- */
.wfs-form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.wfs-form-group.full-width {
    grid-column: 1 / -1;
}

/* Explicitly hide any visible label (belt + suspenders) */
.wfs-form-group label:not(.wfs-sr-only) {
    display: none !important;
}

/* ---------- Inputs & Textarea ---------- */
.wfs-form-group input[type="text"],
.wfs-form-group input[type="email"],
.wfs-form-group input[type="number"],
.wfs-form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #dfe6e9;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    background-color: #fbfbfb;
    box-sizing: border-box;
    font-family: inherit;
    color: #2d3436;
    -webkit-appearance: none;
    appearance: none;
}

.wfs-form-group textarea {
    resize: vertical;
    min-height: 110px;
}

/* ---------- Select Dropdowns ---------- */
.wfs-form-group select {
    width: 100%;
    max-width: 100%;
    padding: 12px 40px 12px 16px;
    border: 1.5px solid #dfe6e9;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.5;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    background-color: #fbfbfb;
    box-sizing: border-box;
    font-family: inherit;
    color: #2d3436;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23636e72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.wfs-form-group select option[value=""][disabled] {
    color: #b2bec3;
}

/* ---------- Focus states ---------- */
.wfs-form-group input:focus,
.wfs-form-group textarea:focus,
.wfs-form-group select:focus {
    outline: none;
    border-color: #6c5ce7;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.12);
}

/* ---------- Submit button ---------- */
.wfs-form-submit {
    margin-top: 20px;
}

.wfs-form-submit button {
    width: 100%;
    padding: 14px 20px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.wfs-form-submit button:hover {
    background-color: #222222;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.wfs-form-submit button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ---------- Loader ---------- */
.wfs-loader {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #fff;
    animation: wfs-spin 0.8s linear infinite;
    display: none;
    margin-left: 10px;
    flex-shrink: 0;
}

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

button.loading .wfs-loader {
    display: inline-block;
}

button.loading span {
    opacity: 0.85;
}

/* ---------- Inline response messages ---------- */
#wfs-form-response {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    display: none;
    font-weight: 500;
}

#wfs-form-response.success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
    display: block;
}

#wfs-form-response.error {
    background: #fdf2f2;
    color: #922b21;
    border: 1px solid #f5b7b1;
    display: block;
}

/* ---------- Thank You screen ---------- */
.wfs-thankyou {
    display: none;
    text-align: center;
    padding: 48px 24px;
}

.wfs-thankyou.is-visible {
    display: block;
}

.wfs-thankyou__icon {
    width: 64px;
    height: 64px;
    background: #eafaf1;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.wfs-thankyou__icon svg {
    width: 32px;
    height: 32px;
    stroke: #1e8449;
}

.wfs-thankyou h3 {
    font-size: 22px;
    font-weight: 700;
    color: #2d3436;
    margin: 0 0 10px;
}

.wfs-thankyou p {
    font-size: 15px;
    color: #636e72;
    margin: 0;
    line-height: 1.6;
}

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

/* Tablet  (≤ 768px) */
@media (max-width: 768px) {
    .wfs-form-container {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .wfs-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-bottom: 14px;
    }
}

/* Mobile  (≤ 600px) – single column */
@media (max-width: 600px) {
    .wfs-form-container {
        padding: 20px 16px;
        border-radius: 10px;
        margin: 0 auto;
    }

    .wfs-form-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 12px;
    }

    .wfs-form-group.full-width {
        grid-column: 1 / -1;
    }

    .wfs-form-group input[type="text"],
    .wfs-form-group input[type="email"],
    .wfs-form-group input[type="number"],
    .wfs-form-group select,
    .wfs-form-group textarea {
        font-size: 16px; /* prevents iOS zoom on focus */
        padding: 11px 14px;
    }

    .wfs-form-group select {
        padding-right: 38px;
    }

    .wfs-form-submit button {
        font-size: 15px;
        padding: 13px 16px;
    }
}

/* Very small screens (≤ 380px) */
@media (max-width: 380px) {
    .wfs-form-container {
        padding: 16px 12px;
    }
}
