/* ===========================================
   SMART FORM - Dynamic Form System v0.701
   MAG Tech Team
   - Checkbox styling added
   =========================================== */

/* Container */
.smart_form {
    width: 100%;
    margin: 0 auto;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

/* Section container - the blue rounded boxes */
.smart_form__section {
    border-radius: 10px;
    background: #d6e8f4;
    border: 1px solid #acc9dd;
    display: flex;
    flex-direction: column;
    padding: 15px;
    margin-bottom: 15px;
}

/* h1 tags use site-wide styling - just add icon alignment */
.smart_form h1 {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Intro/prompt text */
.smart_form__prompt {
    margin-bottom: 20px;
    line-height: 1.5;
}

.smart_form__prompt strong {
    font-weight: bold;
}

.smart_form__prompt em {
    font-style: italic;
}

/* Required field notice */
.smart_form__required-notice {
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Field row - label and input side by side */
.smart_form__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 10px;
}

/* Label column */
.smart_form__label {
    width: 20%;
    text-align: right;
    padding-right: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

/* Input column */
.smart_form__input {
    width: 80%;
    padding-left: 10px;
}

/* All form inputs base styling */
.smart_form input[type="text"],
.smart_form input[type="email"],
.smart_form input[type="tel"],
.smart_form input[type="date"],
.smart_form select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 8px;
    font-size: 14px;
    background-color: #ffffff;
}

/* Textarea styling - white background, border radius matches section */
.smart_form textarea {
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff !important;
    border: 1px solid #acc9dd;
    border-radius: 10px;
    color: #000;
    box-shadow: none;
    outline: none;
    padding: 12px;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    resize: vertical;
    text-transform: none !important;
}

/* Ensure placeholder is not transformed */
.smart_form textarea::placeholder {
    text-transform: none !important;
}

/* Select dropdown */
.smart_form select {
    cursor: pointer;
}

/* Disabled select options */
.smart_form select option:disabled {
    color: #999;
    font-style: italic;
}

/* Title case auto-capitalize - NOT for textareas */
.smart_form--titlecase {
    text-transform: capitalize;
}

/* Required icon */
.smart_form__required-icon {
    width: 11px;
    height: 11px;
    vertical-align: middle;
}

/* Section icon */
.smart_form__section-icon {
    vertical-align: middle;
}

/* Submit area */
.smart_form__submit {
    text-align: right;
    margin-top: 10px;
}

.smart_form__submit input[type="image"] {
    cursor: pointer;
}

/* Hidden fields container */
.smart_form__hidden {
    display: none;
}

/* Sub-dropdown (two-tier) */
.smart_form__sub-select {
    margin-top: 10px;
}

/* File attachment area */
.smart_form__attachments {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #acc9dd;
}

.smart_form__attachments-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.smart_form__file-row {
    margin-bottom: 8px;
}

.smart_form input[type="file"] {
    font-size: 13px;
}

/* =============================================
   REPEATABLE SECTIONS (PBX, etc.)
   ============================================= */

.smart_form__repeatable-header {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.smart_form__repeatable-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.smart_form__repeatable-row {
    display: flex;
    gap: 10px;
}

.smart_form__repeatable-col {
    flex: 1;
}

.smart_form__repeatable-col input {
    width: 100%;
    box-sizing: border-box;
}

.smart_form__add-btn-container {
    text-align: right;
    margin-top: 15px;
}

.smart_form__add-btn {
    background: #3a5a8a;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
}

.smart_form__add-btn:hover {
    background: #2a4a7a;
}

/* =============================================
   CHECKBOX STYLING (v0.701)
   ============================================= */

.smart_form__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.smart_form__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3a5a8a;
}

.smart_form__checkbox span {
    user-select: none;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .smart_form__row {
        flex-wrap: wrap;
    }

    .smart_form__label {
        width: 100%;
        text-align: left;
        justify-content: flex-start;
        margin-bottom: 5px;
        padding-right: 0;
    }

    .smart_form__input {
        width: 100%;
        padding-left: 0;
    }

    .smart_form__repeatable-header {
        display: none;
    }

    .smart_form__repeatable-row {
        flex-direction: column;
        border-bottom: 1px solid #acc9dd;
        padding-bottom: 10px;
        margin-bottom: 10px;
    }

    .smart_form__repeatable-col {
        width: 100%;
    }
}

/* =============================================
   DEBUG MODE
   ============================================= */

.smart_form__debug {
    background: #fffbe6;
    border: 1px solid #ffe066;
    padding: 15px;
    margin-top: 20px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
}

.smart_form__debug-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #d48806;
}
