/**
 * WooCommerce City & Street Selector Pro - Frontend Styles
 * Version: 3.2.0
 */

/* General */
.wccs-city-select, .wccs-street-select { width: 100%; }
.wccs-city-select select, .wccs-street-select select { width: 100%; max-width: 100%; }

/* Select2 RTL */
.select2-container--default .select2-selection--single { direction: rtl; text-align: right; }
.select2-container--default .select2-selection--single .select2-selection__rendered { padding-right: 10px; padding-left: 28px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { left: 1px; right: auto; }
.select2-dropdown { direction: rtl; text-align: right; }
.select2-container--default .select2-results__option { padding: 8px 12px; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: #0073aa; color: #fff; }
.select2-search--dropdown .select2-search__field { direction: rtl; text-align: right; padding: 8px; }
.select2-results__message { color: #666; padding: 10px; }
.select2-container--default.select2-container--focus .select2-selection--single { border-color: #0073aa; box-shadow: 0 0 0 1px #0073aa; }
.wccs-street-field[disabled] + .select2-container .select2-selection--single { background-color: #f5f5f5; cursor: not-allowed; }

/* ═══════════════════════════════════════════════
   Feature 3: Extra address fields (inline row)
   ═══════════════════════════════════════════════ */

/* Wrapper to put the 3 fields side-by-side */
.wccs-extra-fields-row {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
    margin-bottom: 0;
}

/* Each field takes equal width inside the row */
.wccs-extra-fields-row .form-row.wccs-extra-field {
    flex: 1 1 0;
    min-width: 0;
    float: none !important;
    width: auto !important;
    padding: 0 !important;
    margin-bottom: 20px;
}

/* Force inline even without wrapper class (fallback) */
.form-row.wccs-house-number,
.form-row.wccs-apartment,
.form-row.wccs-floor {
    display: inline-block;
    width: calc(33.333% - 8px) !important;
    float: right;
    clear: none !important;
}

.form-row.wccs-house-number { margin-left: 10px; }
.form-row.wccs-apartment    { margin-left: 10px; }
.form-row.wccs-floor        { margin-left: 0; }

/* Labels */
.form-row.wccs-extra-field label { font-size: 0.9em; }

/* Inputs fill their cell */
.form-row.wccs-extra-field input[type="text"] { width: 100%; box-sizing: border-box; }

/* Clear float after extra field group */
.form-row.wccs-floor::after {
    content: '';
    display: table;
    clear: both;
}

/* Responsive: stack on very small screens */
@media (max-width: 480px) {
    .form-row.wccs-house-number,
    .form-row.wccs-apartment,
    .form-row.wccs-floor {
        display: block;
        width: 100% !important;
        float: none !important;
        margin-left: 0;
    }
    .select2-container { width: 100% !important; }
    .select2-container--default .select2-selection--single { height: 45px; line-height: 43px; }
    .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 43px; }
    .select2-container--default .select2-selection--single .select2-selection__arrow  { height: 43px; }
}
