/* Region Pricing Specific Styles */
:root {
    --primary-color: #ff4747;
    --border-color: #e0e0e0;
    --text-color: #333;
    --bg-color: #f5f5f5;
}

#regionPricingModal {
    z-index: 999; /* 设置为您需要的值 */
}

.region-modal-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
    gap: 16px;
    background-color: #fff;
}

/* Top Section: Tax Countries */
.region-top-section {
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 8px;
    background-color: #f9f9f9;
    width: 100%;
    box-sizing: border-box;
}

.region-top-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 600;
}

.tax-countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 220px;
    overflow-y: auto;
}

.tax-country-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tax-country-label {
    font-size: 14px;
    color: #666;
}

.tax-country-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
}

.tax-country-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 71, 71, 0.1);
}

/* Middle Section */
.region-middle-section {
    display: flex;
    flex: 1;
    gap: 16px;
    min-height: 0; /* For scrolling */
}

/* Left Panel: Country Selection */
.region-left-panel {
    width: 40%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    overflow: hidden;
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: #f9f9f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
}

.region-right-panel {
    width: 60%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
    position: relative;
}

/* Bottom Section: Submit Button */
.region-bottom-section {
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

#submitRegionPricing {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background-color: rgba(65, 209, 127, 0.2);
    color: #42b672;
    border: 1px solid rgba(65, 209, 127, 0.3);
    width: 100%;
    transition: all 0.3s ease;
}

#submitRegionPricing:hover {
    background-color: rgba(65, 209, 127, 0.4);
    color: #35b86c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(65, 209, 127, 0.3);
}

.country-select-container {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    align-content: start;
}

.country-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

.country-checkbox-item:hover {
    background-color: #f0f7ff;
    border-color: #1890ff;
}

.country-checkbox-item:last-child {
    border: 1px solid #eee;
}

.region-country-checkbox {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.region-table-container {
    flex: 1;
    overflow: auto;
}

.region-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.region-table th, .region-table td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: center;
}

.region-table th {
    background-color: #f5f5f5;
    position: sticky;
    top: 0;
    font-weight: 600;
    color: #333;
    z-index: 999;
}

.editable-cell {
    cursor: pointer;
    position: relative;
}

.editable-cell:hover {
    background-color: #e6f7ff;
}

.cell-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #1890ff;
    padding: 6px;
    border-radius: 4px;
    text-align: center;
}

/* No Data State */
#regionNoData {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #999;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}