/**
 * Country Selector Styles
 * 
 * @package VMPFence
 * @since 2.2.0
 */

/* Country Selector Container */
.vmpfence-country-selector {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.vmpfence-selector-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1e1e1e;
    margin-bottom: 8px;
    display: block;
}

/* Search Input */
.vmpfence-country-search {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
    background: #fff;
}

.vmpfence-country-search:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 3px rgba(25, 25, 112, 0.1);
}

/* Dropdown List */
.vmpfence-country-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #dcdcde;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: #fff;
}

.vmpfence-country-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f0f0f1;
}

.vmpfence-country-option:last-child {
    border-bottom: none;
}

.vmpfence-country-option:hover {
    background: #f6f7f7;
}

.vmpfence-country-flag {
    font-size: 24px;
    margin-right: 12px;
    line-height: 1;
}

.vmpfence-country-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #1e1e1e;
}

.vmpfence-country-code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #646970;
    background: #f0f0f1;
    padding: 4px 8px;
    border-radius: 4px;
}

.vmpfence-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #8c8f94;
    font-size: 14px;
}

/* Selected Countries Tags */
.vmpfence-selected-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 60px;
    padding: 12px;
    background: #f6f7f7;
    border: 2px dashed #dcdcde;
    border-radius: 8px;
    margin-bottom: 16px;
}

.vmpfence-selected-countries:empty::before {
    content: 'Selected countries will appear here...';
    color: #8c8f94;
    font-style: italic;
    font-size: 13px;
}

.vmpfence-country-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.vmpfence-tag-flag {
    font-size: 18px;
    line-height: 1;
}

.vmpfence-tag-name {
    font-weight: 500;
    color: #1e1e1e;
}

.vmpfence-tag-code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    color: #646970;
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
}

.vmpfence-tag-remove {
    background: none;
    border: none;
    color: #dc3232;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    font-weight: bold;
    transition: color 0.2s ease;
}

.vmpfence-tag-remove:hover {
    color: #a00;
}

/* Blocking Options */
.vmpfence-blocking-options {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.vmpfence-checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vmpfence-checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.vmpfence-checkbox-field label {
    font-size: 14px;
    color: #1e1e1e;
    cursor: pointer;
    margin: 0;
}

/* Reason Field */
.vmpfence-reason-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1e1e1e;
    margin-bottom: 8px;
}

.vmpfence-reason-field textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.vmpfence-reason-field textarea:focus {
    outline: none;
    border-color: #191970;
    box-shadow: 0 0 0 3px rgba(25, 25, 112, 0.1);
}

/* Submit Button */
.vmpfence-btn-block {
    background: #191970;
    color: #fff;
    border: none;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vmpfence-btn-block:hover {
    background: #0f0f4d;
}

.vmpfence-btn-block:disabled {
    background: #8c8f94;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Blocked Countries Table */
.vmpfence-blocked-countries-section {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 0;
    margin-top: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Header Section */
.vmpfence-countries-header {
    padding: 24px;
    border-bottom: 1px solid #f0f0f1;
}

.vmpfence-countries-title {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #191970;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vmpfence-count-badge {
    font-size: 16px;
    font-weight: 400;
    color: #646970;
}

/* Controls Row */
.vmpfence-countries-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Search Box */
.vmpfence-countries-search-wrapper {
    flex: 0 0 350px;
}

.vmpfence-countries-search {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #191970;
    transition: all 0.2s ease;
}

.vmpfence-countries-search:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.vmpfence-countries-search::placeholder {
    color: #8c8f94;
}

/* Filter Buttons */
.vmpfence-countries-filters {
    display: flex;
    gap: 8px;
}

.vmpfence-filter-btn {
    height: 48px;
    padding: 0 24px;
    background: #FFFFFF;
    border: 1px solid #191970;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #191970;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vmpfence-filter-btn:hover {
    background: #f8f9fa;
}

.vmpfence-filter-btn.vmpfence-filter-active {
    background: #191970;
    color: #FFFFFF;
}

.vmpfence-filter-check {
    display: none;
    font-size: 16px;
    font-weight: 700;
}

.vmpfence-filter-btn.vmpfence-filter-active .vmpfence-filter-check {
    display: inline;
}

.vmpfence-section-heading {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0 0 20px 0;
}

.vmpfence-countries-loading,
.vmpfence-countries-empty {
    text-align: center;
    padding: 40px 20px;
}

.vmpfence-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #191970;
    border-radius: 50%;
    animation: vmpfence-spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes vmpfence-spin {
    to { transform: rotate(360deg); }
}

.vmpfence-empty-hint {
    color: #8c8f94;
    font-size: 14px;
    margin-top: 8px;
}

/* Table Styles */
.vmpfence-blocked-countries-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
}

.vmpfence-blocked-countries-table thead {
    background: transparent;
}

.vmpfence-blocked-countries-table th {
    padding: 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f1;
    background: #fafafa;
}

.vmpfence-blocked-countries-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 14px;
    color: #1e1e1e;
    vertical-align: middle;
}

.vmpfence-blocked-countries-table tbody tr:hover {
    background: #f9f9f9;
}

/* Country Column */
.vmpfence-blocked-countries-table .vmpfence-country-flag {
    font-size: 32px;
    line-height: 1;
}

.vmpfence-blocked-countries-table .vmpfence-country-name {
    font-weight: 600;
    color: #191970;
    display: block;
    margin-bottom: 4px;
}

.vmpfence-blocked-countries-table .vmpfence-country-code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    color: #646970;
    background: #f0f0f1;
    padding: 2px 8px;
    border-radius: 4px;
}

/* Block Type Badges */
.vmpfence-blocking-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.vmpfence-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
}

.vmpfence-badge-login {
    background: #FFF4E5;
    color: #92400e;
}

.vmpfence-badge-site {
    background: #FFE5E5;
    color: #991b1b;
}

/* Date Columns */
.vmpfence-blocked-date,
.vmpfence-expires-date {
    font-size: 13px;
    color: #646970;
    font-family: 'Inter', sans-serif;
}

.vmpfence-expires-permanent {
    font-weight: 600;
    color: #191970;
}

.vmpfence-block-count {
    font-size: 16px;
    font-weight: 600;
    color: #191970;
}

/* Source Badge Styles */
.vmpfence-source-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
}

.vmpfence-source-badge.vmpfence-source-local,
.vmpfence-source-badge.vmpfence-source-manual {
    background: #F8F9FA;
    color: #191970;
}

.vmpfence-source-badge.vmpfence-source-api {
    background: #FFF4E5;
    color: #F5A623;
}

.vmpfence-source-badge.vmpfence-source-auto {
    background: #E5F2FF;
    color: #007AFF;
}

/* Unblock Button */
.vmpfence-btn-unblock-country {
    background: #191970;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.vmpfence-btn-unblock-country:hover {
    background: #0f0f4d;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(25, 25, 112, 0.2);
}

.vmpfence-btn-unblock-country:disabled {
    background: #8c8f94;
    cursor: not-allowed;
    opacity: 0.4;
    transform: none;
}
