/* ================
   FORM CONTAINER
   ================ */
.wefb-frontend-form-wrapper,
.wefb-frontend-form-wrapper * {
    box-sizing: border-box;
}

.wefb-frontend-form-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}



.wefb-frontend-form {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 30px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.wefb-before-form {
    margin-bottom: 16px;
}

.wefb-success {
    padding: 12px 14px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    margin: 12px 0;
}

.wefb-errors {
    padding: 12px 14px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
    margin: 12px 0;
}

.wefb-required-marker {
    color: #dc2626;
    font-weight: 700;
}

/* ================
   SECTIONS / COLUMNS
   ================ */
.wefb-section {
    display: grid;
    gap: 20px;
    margin-bottom: 25px;
    min-width: 0;
}

.wefb-section.columns-1 {
    grid-template-columns: minmax(0, 1fr);
}

.wefb-section.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wefb-section.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wefb-section.columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ================
   FIELDS
   ================ */
.wefb-field {
    display: grid;
    gap: 8px;
    align-content: start;
    min-width: 0;
}

.wefb-layout-label_left .wefb-field {
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
}

.wefb-layout-label_left .wefb-field > label,
.wefb-layout-label_left .wefb-field > .wefb-label {
    margin-top: 10px;
}

.wefb-layout-label_top .wefb-field {
    grid-template-columns: 1fr;
}

.wefb-field label {
    font-weight: 600;
    margin: 0;
    font-size: 14px;
    color: #333;
}

.wefb-field > .wefb-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin: 0;
}

.wefb-field input,
.wefb-field select,
.wefb-field textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wefb-field input[type="file"] {
    padding: 8px 10px;
}

.wefb-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #6b7280 50%), linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.wefb-field select[multiple] {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none;
    padding: 6px;
    min-height: 140px;
    border-radius: 10px;
    line-height: 1.35;
}

.wefb-multi-dropdown {
    position: relative;
}

.wefb-multi-dropdown-toggle {
    width: 100%;
    min-height: 42px;
    border: 1px solid #ccd0d5;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    padding: 10px 40px 10px 12px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
}

.wefb-multi-dropdown-toggle::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: translateY(-65%) rotate(45deg);
}

.wefb-multi-dropdown.is-open .wefb-multi-dropdown-toggle {
    border-color: #4c8bf5;
    box-shadow: 0 0 0 3px rgba(76, 139, 245, 0.12);
}

.wefb-multi-dropdown.is-open .wefb-multi-dropdown-toggle::after {
    transform: translateY(-25%) rotate(-135deg);
}

.wefb-multi-dropdown-menu {
    display: none;
    position: absolute;
    z-index: 20;
    width: 100%;
    max-height: 220px;
    overflow: auto;
    margin-top: 6px;
    border: 1px solid #d6dbe3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.1);
    padding: 6px;
}

.wefb-multi-dropdown.is-open .wefb-multi-dropdown-menu {
    display: block;
}

.wefb-multi-dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.wefb-multi-dropdown-option:hover {
    background: #f4f7fb;
}

.wefb-multi-dropdown-option input {
    margin: 0;
}

.wefb-multi-dropdown-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.wefb-multi-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #d9e3f2;
    background: #f4f7fb;
    color: #1f3b63;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}

.wefb-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.wefb-theme-classic .wefb-frontend-form {
    border: 1px solid #d1d5db;
    box-shadow: none;
    border-radius: 4px;
}

.wefb-theme-matchmytheme .wefb-frontend-form {
    box-shadow: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    font-family: inherit;
}

.wefb-field input:focus,
.wefb-field select:focus,
.wefb-field textarea:focus {
    border-color: #4c8bf5;
    box-shadow: 0 0 0 3px rgba(76, 139, 245, 0.15);
    outline: none;
}

/* Inline radios/checkboxes */
.wefb-inline {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-weight: normal;
    font-size: 14px;
}

.wefb-inline input {
    margin-right: 6px;
}

.wefb-choice-group {
    display: grid;
    gap: 10px;
}

.wefb-choice-group .wefb-choice {
    width: fit-content;
}

.wefb-repeatable {
    display: grid;
    gap: 10px;
}

.wefb-repeatable-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 8px;
    align-items: center;
}

.wefb-add-row,
.wefb-remove-row {
/*    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;*/
}

.wefb-add-row {
    justify-self: start;
    padding: 8px 14px;
    font-weight: 600;
}

.wefb-remove-row {
    width: 40px;
    height: 40px;
    font-size: 20px;
    line-height: 0;
}

/* Ensure native radios/checkboxes show their checked state even when themes override defaults */
.wefb-field input[type="radio"],
.wefb-field input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: auto;
    accent-color: #1d4ed8;
    width: auto;
    max-width: none;
    min-width: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    flex: 0 0 auto;
}

/* ================
   DIVIDERS (only if visible)
   ================ */
.wefb-divider {
    grid-column: 1 / -1;
    padding: 10px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 15px;
}

.wefb-divider h3 {
    margin: 0;
    font-size: 18px;
    color: #555;
}

/* ================
   MULTIPAGE NAVIGATION
   ================ */
.wefb-page {
    display: block;
}

.wefb-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.wefb-form-actions button {
/*    background: #4c8bf5;
    color: #fff;*/
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wefb-form-actions button:hover {
/*    background: #3a74d9;*/
}

.wefb-form-actions .wefb-prev {
    background: #e0e0e0;
    color: #333;
}

.wefb-form-actions .wefb-prev:hover {
    background: #c9c9c9;
}

/* ================
   RESPONSIVE
   ================ */
@media (max-width: 768px) {
    .wefb-section.columns-2,
    .wefb-section.columns-3,
    .wefb-section.columns-4 {
        grid-template-columns: 1fr;
    }
    .wefb-layout-label_left .wefb-field {
        grid-template-columns: 1fr;
    }
}
/* Error styling */
.wefb-error {
    color: #d93025;
    font-size: 12px;
    margin-top: 2px;
}

.wefb-layout-label_left .wefb-error {
    grid-column: 2;
}

.wefb-error-input {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.2) !important;
}

.wefb-form-description {
    margin: 0 0 16px;
    color: #374151;
}

.wefb-limit-status {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #eef6ff;
    border: 1px solid #c7ddff;
    color: #1f3f6e;
    font-weight: 500;
}

.wefb-recaptcha {
    margin: 0 0 14px;
}

.wefb-password-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.wefb-password-toggle {
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    background: #f8fafc;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.wefb-password-strength {
    font-size: 12px;
    color: #6b7280;
}

.wefb-password-strength-value.wefb-strength-weak {
    color: #b91c1c;
}

.wefb-password-strength-value.wefb-strength-medium {
    color: #b45309;
}

.wefb-password-strength-value.wefb-strength-strong {
    color: #065f46;
}
