/**
 * WooCommerce Product Price Based on Country Integration Styles
 */

/* Currency Switcher Styles */
.alcs-wcpbc-currency-switcher {
    margin: 15px 0;
    display: block;
    width: 100%;
    max-width: 300px;
}

.alcs-wcpbc-currency-switcher select.alcs-currency-select {
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    box-shadow: none;
    font-size: 14px;
    height: auto;
    color: #333;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M5 6l5 5 5-5 2 1-7 7-7-7z" fill="%23555"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 16px 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.alcs-wcpbc-currency-switcher ul.alcs-currency-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.alcs-wcpbc-currency-switcher ul.alcs-currency-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ddd;
}

.alcs-wcpbc-currency-switcher ul.alcs-currency-list li:last-child {
    border-bottom: none;
}

.alcs-wcpbc-currency-switcher ul.alcs-currency-list li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    transition: background-color 0.2s ease;
}

.alcs-wcpbc-currency-switcher ul.alcs-currency-list li a:hover {
    background-color: #f5f5f5;
}

.alcs-wcpbc-currency-switcher ul.alcs-currency-list li a.active {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Admin Integration Styles */
.alcs-features-list li {
    margin-bottom: 8px;
}

.alcs-pro-features {
    margin-top: 20px;
    background: #f8f8f8;
    padding: 15px;
    border-left: 4px solid #2271b1;
}

.alcs-pro-features h3 {
    margin-top: 0;
}

/* Make sure admin tabs are visible */
.alcs-admin-tabs .nav-tab-wrapper {
    display: block !important;
}

.alcs-admin-tabs .nav-tab {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure settings page elements are properly displayed */
.alcs-admin-content {
    margin-top: 20px;
    display: block !important;
}

.alcs-admin-content table.form-table {
    display: table !important;
    width: 100%;
}

.alcs-admin-content table.form-table th,
.alcs-admin-content table.form-table td {
    display: table-cell !important;
}

/* Pricing Zone Display */
.alcs-pricing-zones {
    margin-top: 15px;
}

.alcs-pricing-zones ul {
    list-style: disc outside;
    margin-left: 20px;
}

/* Shortcode Display */
.alcs-shortcode-example {
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 3px;
    display: inline-block;
    font-family: monospace;
}

/* Fix any hidden buttons or controls */
.alcs-admin-content button,
.alcs-admin-content input[type="button"],
.alcs-admin-content input[type="submit"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Enhanced admin table styles */
.alcs-admin-content .wp-list-table {
    border-collapse: collapse;
    width: 100%;
    display: table !important;
}

.alcs-admin-content .wp-list-table th,
.alcs-admin-content .wp-list-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.alcs-admin-content .wp-list-table th {
    font-weight: 600;
    background-color: #f5f5f5;
}

.alcs-admin-content .wp-list-table tr:hover td {
    background-color: #f9f9f9;
}

/* Fix for RTL support */
.rtl .alcs-wcpbc-currency-switcher select.alcs-currency-select {
    background-position: left 10px top 50%;
    padding-right: 12px;
    padding-left: 30px;
}

.rtl .alcs-pro-features {
    border-left: none;
    border-right: 4px solid #2271b1;
}

/* Responsive styles */
@media screen and (max-width: 782px) {
    .alcs-wcpbc-currency-switcher {
        max-width: 100%;
    }
    
    .alcs-admin-content table.form-table th {
        padding-bottom: 5px;
    }
    
    .alcs-admin-content table.form-table td {
        padding-bottom: 15px;
    }
}

/* WCPBC Pro Features - Extra Strong Selectors with !important */
/* Target all possible containers and selectors */
body .woocommerce .form-table tr,
body #wpbody-content .woocommerce .form-table tr, 
body #wpbody .woocommerce .form-table tr,
body .wrap .woocommerce .form-table tr,
body .woocommerce table.form-table tr {
    display: table-row !important;
}

/* Target specific currency features by combining multiple selectors */
body #woocommerce_price_based_country-currency-options,
body table tr[data-name*="custom_currency_symbol"],
body table tr[data-name*="currency_format"],
body table tr[data-name*="currency_position"],
body table tr[data-name*="thousand_sep"],
body table tr[data-name*="decimal_sep"],
body table tr[data-name*="num_decimals"],
body .wcpbc_custom_currency_symbol_field,
body .wcpbc_currency_format_field,
body .wcpbc_currency_position_field,
body .wcpbc_thousand_sep_field,
body .wcpbc_decimal_sep_field,
body .wcpbc_num_decimals_field,
body .woocommerce-wcpbc-pricing-zone-settings .form-table tr,
body .wc-metaboxes-wrapper .wcpbc-zone-settings tr {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Price options */
body #woocommerce_price_based_country-price-options,
body table tr[data-name*="price_rounding"],
body table tr[data-name*="round_nearest"],
body .wcpbc_price_rounding_field,
body .wcpbc_round_nearest_field {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Exchange rate options */
body #woocommerce_price_based_country-exchange-rate,
body table tr[data-name*="auto_exchange"],
body table tr[data-name*="exchange_rate_fee"],
body table tr[data-name*="exchange_rate_api"],
body .wcpbc_auto_exchange_rate_field,
body .wcpbc_exchange_rate_fee_field,
body .wcpbc_exchange_rate_api_field {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force inputs and selects to be visible */
body .wcpbc-zone-settings input,
body .wcpbc_custom_currency_symbol_field input,
body .wcpbc_currency_format_field input,
body .wcpbc_thousand_sep_field input,
body .wcpbc_decimal_sep_field input,
body .wcpbc_num_decimals_field input,
body .wcpbc_exchange_rate_fee_field input,
body .wcpbc_round_nearest_field input,
body .wcpbc_currency_position_field select,
body .wcpbc_price_rounding_field select,
body .wcpbc_auto_exchange_rate_field select,
body .wcpbc_exchange_rate_api_field select,
body .wcpbc-zone-settings select,
body .woocommerce-wcpbc-pricing-zone-settings select {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    min-width: 200px !important;
}

/* Force all table cells to be visible */
body .woocommerce table.form-table th,
body .woocommerce table.form-table td,
body .woocommerce-page table.form-table th,
body .woocommerce-page table.form-table td,
body .woocommerce-wcpbc-pricing-zone-settings table.form-table th,
body .woocommerce-wcpbc-pricing-zone-settings table.form-table td {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force section headings to be visible */
body .form-table th.wcpbc-section-heading,
body .woocommerce-wcpbc-pricing-zone-settings th.wcpbc-section-heading,
body .woocommerce .form-table th.wcpbc-section-heading,
body .wc-metaboxes th.wcpbc-section-heading {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #f9f9f9 !important;
    padding: 15px 10px !important;
    font-weight: 600 !important;
}

/* Fix descriptions */
body .wcpbc-zone-settings p.description,
body .wcpbc_custom_currency_symbol_field p.description,
body .wcpbc_currency_format_field p.description,
body .wcpbc_currency_position_field p.description,
body .wcpbc_thousand_sep_field p.description,
body .wcpbc_decimal_sep_field p.description,
body .wcpbc_num_decimals_field p.description,
body .wcpbc_price_rounding_field p.description,
body .wcpbc_round_nearest_field p.description,
body .wcpbc_auto_exchange_rate_field p.description,
body .wcpbc_exchange_rate_fee_field p.description,
body .wcpbc_exchange_rate_api_field p.description {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 5px !important;
    color: #777 !important;
}

/* Fix for zone sections - extremely specific selector */
body .wcpbc-zone-settings h3,
body .wcpbc-zone-settings h4,
body .woocommerce-wcpbc-pricing-zone-settings h3,
body .woocommerce-wcpbc-pricing-zone-settings h4,
body #woocommerce-product-data .wcpbc-zone-settings h3,
body #woocommerce-product-data .wcpbc-zone-settings h4 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 1.5em 0 1em !important;
}

/* Fix checkboxes - extremely specific selector */
body .wcpbc-zone-settings input[type="checkbox"],
body .wcpbc_auto_exchange_rate_field input[type="checkbox"],
body .wcpbc_price_rounding_field input[type="checkbox"],
body .woocommerce-wcpbc-pricing-zone-settings input[type="checkbox"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
}

/* Fix price format preview - extremely specific selector */
body .wcpbc-zone-settings .wcpbc-price-preview,
body .woocommerce-wcpbc-pricing-zone-settings .wcpbc-price-preview,
body .wcpbc-price-preview {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 5px 10px !important;
    background: #f0f0f0 !important;
    border-radius: 3px !important;
    margin-top: 5px !important;
}

/* Target product metabox fields */
body #woocommerce-product-data .wc-metaboxes-wrapper .wcpbc-zone-settings table.form-table tr,
body #woocommerce-product-data .wc-metaboxes-wrapper .wcpbc-zone-settings table.form-table th,
body #woocommerce-product-data .wc-metaboxes-wrapper .wcpbc-zone-settings table.form-table td {
    display: table-row !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* WCPBC Zone Settings in Product Edit Page */
body .woocommerce #woocommerce-product-data .wc-metaboxes-wrapper .wcpbc-zone-settings {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix specific issues with currency symbol fields */
body .woocommerce-wcpbc-pricing-zone-settings .form-field._regular_price_field,
body .woocommerce-wcpbc-pricing-zone-settings .form-field._sale_price_field,
body .woocommerce-wcpbc-pricing-zone-settings .form-field._price_field,
body #woocommerce-product-data .wcpbc-zone-settings .form-field._regular_price_field,
body #woocommerce-product-data .wcpbc-zone-settings .form-field._sale_price_field,
body #woocommerce-product-data .wcpbc-zone-settings .form-field._price_field {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Make sure the pricing zone labels are visible */
body .wcpbc-zone-settings label,
body .woocommerce-wcpbc-pricing-zone-settings label,
body #woocommerce-product-data .wcpbc-zone-settings label {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 5px !important;
}

/* Universal override for any hidden elements - use with caution */
body.wp-admin .wcpbc-zone-settings * {
    visibility: visible !important;
} 