/* Dual Address System Styling */

.dual-address-tabs {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background-color: #f9f9f9;
}

.address-system-tabs {
    border-bottom: 2px solid #3c8dbc;
    margin-bottom: 20px;
}

.address-system-tabs > li > a {
    border-radius: 0;
    color: #555;
    margin-right: 2px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.address-system-tabs > li.active > a,
.address-system-tabs > li.active > a:focus,
.address-system-tabs > li.active > a:hover {
    border: 1px solid #3c8dbc;
    border-bottom-color: transparent;
    background-color: #3c8dbc;
    color: white;
    font-weight: bold;
}

.address-system-tabs > li > a:hover {
    background-color: #f5f5f5;
    border-color: #eee #eee #3c8dbc;
    color: #3c8dbc;
}

.tab-content {
    padding: 15px 0;
    width: 100% !important;
}

.system-0-address,
.system-1-address {
    transition: all 0.3s ease;
}

.system-0-address .form-group,
.system-1-address .form-group {
    margin-bottom: 15px;
    width: 100% !important;
}

.system-0-address label,
.system-1-address label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #333;
}

.system-0-address .form-control,
.system-1-address .form-control {
    border-radius: 3px;
    border: 1px solid #ccc;
    padding: 8px 12px;
    transition: border-color 0.3s ease;
    width: 100% !important;
    max-width: 100% !important;
}

.system-0-address .form-control:focus,
.system-1-address .form-control:focus {
    border-color: #3c8dbc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(60, 139, 188, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .address-system-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .address-system-tab {
        width: 100%;
        text-align: center;
    }
    
    .system-0-address .row,
    .system-1-address .row {
        margin: 0;
    }
    
    .system-0-address .col-md-6,
    .system-1-address .col-md-6 {
        padding: 0 5px;
    }
}

/* Force full width for all address system elements */
.dual-address-tabs .tab-content,
.dual-address-tabs .tab-pane,
.dual-address-tabs .form-group,
.dual-address-tabs .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Ultra-aggressive width forcing for new address system */
#system-1-address .form-control,
#system-1-address select,
#system-1-address .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* Force Select2 containers to full width */
.select2-container--default .select2-selection--single {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

.select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* Ensure both tabs have identical styling */
#system-0-address,
#system-1-address {
    width: 100% !important;
}

#system-0-address .form-group,
#system-1-address .form-group {
    width: 100% !important;
    margin-bottom: 15px;
}

#system-0-address .form-control,
#system-1-address .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Override any Bootstrap or framework constraints */
.dual-address-tabs .tab-pane .form-group,
.dual-address-tabs .tab-pane .form-control,
.dual-address-tabs .tab-pane select,
.dual-address-tabs .tab-pane .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: 1 1 100% !important;
    flex-basis: 100% !important;
}

/* Force override any parent container constraints */
.dual-address-tabs * {
    max-width: none !important;
}

.dual-address-tabs .form-control,
.dual-address-tabs select,
.dual-address-tabs .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* Ultra-specific rules for account show view */
.account-show-view .dual-address-tabs .form-control,
.account-show-view .dual-address-tabs select,
.account-show-view .dual-address-tabs .select2-container,
.account-show-view #new_province,
.account-show-view #new_district {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    flex: 1 1 100% !important;
    flex-basis: 100% !important;
    display: block !important;
}

/* Force full width for new address dropdowns specifically */
#new_province,
#new_district {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* Force Select2 containers to full width */
.select2-container--default .select2-selection--single,
.select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* Ultra-aggressive width forcing */
.dual-address-tabs .form-group .form-control,
.dual-address-tabs .form-group select,
.dual-address-tabs .form-group .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
}

/* Force Select2 containers to full width in account show view */
.account-show-view .select2-container--default .select2-selection--single,
.account-show-view .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
}

/* Ultra-specific rules to override any conflicting CSS */
.dual-address-tabs #system-0-address .form-control,
.dual-address-tabs #system-1-address .form-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    flex: 1 1 100% !important;
    flex-basis: 100% !important;
}

/* Force override any Bootstrap or other framework styles */
.dual-address-tabs .tab-pane .form-group .form-control {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
    flex: 1 1 100% !important;
    flex-basis: 100% !important;
}

/* Ensure no flexbox or grid constraints */
.dual-address-tabs .tab-pane .form-group {
    display: block !important;
    width: 100% !important;
}

.dual-address-tabs .tab-pane .form-group .form-control {
    display: block !important;
    width: 100% !important;
}
