/* ============================================================
   WCWP Trade Registration — Frontend Form Styles
   ============================================================ */

/* ---- Section wrapper ---- */

.wcwp-form-section {
    margin: 28px 0 0;
}

.wcwp-section-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #1e1e2e;
    margin: 0 0 0;
    padding: 10px 14px;
    background: #f5f6fa;
    border-left: 4px solid #2d5be3;
    border-radius: 3px 3px 0 0;
}

/* ---- 2-column form table ---- */

.wcwp-form-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.wcwp-form-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.wcwp-form-table tbody tr:last-child {
    border-bottom: none;
}

/* Subtle alternating row tint */
.wcwp-form-table tbody tr:nth-child(even) {
    background: #fafbff;
}

/* Label column */
.wcwp-form-table th {
    width: 34%;
    min-width: 180px;
    max-width: 260px;
    padding: 12px 16px 12px 16px;
    font-weight: 600;
    font-size: 0.92em;
    color: #374151;
    text-align: left;
    vertical-align: middle;
    background: transparent;
    white-space: normal;
    line-height: 1.4;
}

/* Input column */
.wcwp-form-table td {
    padding: 10px 16px 10px 8px;
    vertical-align: middle;
}

/* ---- Input elements ---- */

.wcwp-input,
.wcwp-select {
    width: 100%;
    max-width: 420px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.95em;
    color: #111;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.wcwp-input:focus,
.wcwp-select:focus {
    outline: none;
    border-color: #2d5be3;
    box-shadow: 0 0 0 3px rgba(45, 91, 227, 0.12);
}

textarea.wcwp-input {
    resize: vertical;
    min-height: 80px;
    vertical-align: top;
}

/* ---- Radio buttons ---- */

.wcwp-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding: 2px 0;
}

.wcwp-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.93em;
}

.wcwp-radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

/* ---- Checkboxes (full-width spanning rows) ---- */

.wcwp-checkbox-cell {
    padding: 12px 16px !important;
    background: #fafbff;
}

.wcwp-checkbox-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.93em;
    line-height: 1.5;
}

.wcwp-checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ---- File inputs ---- */

.wcwp-file-hint {
    display: block;
    font-size: 0.82em;
    color: #6b7280;
    margin-bottom: 5px;
}

.wcwp-file-input {
    display: block;
    width: 100%;
    max-width: 420px;
    padding: 7px 10px;
    border: 1px dashed #9ca3af;
    border-radius: 4px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 0.9em;
    box-sizing: border-box;
    transition: border-color 0.15s, background 0.15s;
}

.wcwp-file-input:hover {
    border-color: #2d5be3;
    background: #f0f4ff;
}

/* ---- Required asterisk ---- */

.required {
    color: #dc2626;
}

/* ---- Hidden conditional rows ---- */

/* When a <tr> is hidden by JS, ensure proper display restore */
.wcwp-form-table tr[data-condition-field] {
    /* no special style needed — JS sets display:none / '' */
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
    .wcwp-form-table,
    .wcwp-form-table tbody,
    .wcwp-form-table tr,
    .wcwp-form-table th,
    .wcwp-form-table td {
        display: block;
        width: 100%;
    }

    .wcwp-form-table th {
        padding-bottom: 2px;
        max-width: 100%;
        background: #f5f6fa;
        border-bottom: none;
    }

    .wcwp-form-table td {
        padding-top: 4px;
    }

    .wcwp-input,
    .wcwp-select,
    .wcwp-file-input {
        max-width: 100%;
    }
}
