/* Main styles for GEM Countries Display */
.gem-countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.gem-country-item {
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gem-country-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gem-countries-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.gem-countries-list .gem-country-item {
    text-align: left;
    margin-bottom: 5px;
}

.gem-eligibility-info {
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    padding: 15px;
    margin: 20px 0;
}

.gem-eligibility-checker {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.gem-country-select {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    margin-right: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.gem-check-btn {
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gem-check-btn:hover {
    background: #005a87;
}

.gem-check-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.gem-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.gem-success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
}

.gem-error {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
}

.gem-countries-table {
    margin: 20px 0;
    width: 100%;
    border-collapse: collapse;
}

.gem-countries-table th,
.gem-countries-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.gem-countries-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.gem-status {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.gem-status.eligible {
    background: #d4edda;
    color: #155724;
}

.gem-status.future {
    background: #fff3cd;
    color: #856404;
}

/* Enhanced styles for JavaScript functionality */
.gem-search-container {
    margin-bottom: 20px;
    position: relative;
}

.gem-search-input {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.gem-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.gem-search-count {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.gem-search-count.gem-no-results {
    color: #dc3545;
}

.gem-country-item.gem-selected {
    background: #007cba;
    color: white;
    border-color: #005a87;
    transform: scale(1.05);
}

.gem-actions {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gem-actions button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.gem-actions button:hover {
    background: #f8f9fa;
    border-color: #007cba;
}

.gem-export-dropdown {
    position: relative;
    display: inline-block;
}

.gem-export-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 120px;
}

.gem-export-dropdown:hover .gem-export-options {
    display: block;
}

.gem-export-options button {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 0;
    background: none;
    padding: 8px 12px;
}

.gem-export-options button:hover {
    background: #007cba;
    color: white;
}

.gem-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    z-index: 10000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gem-notification.success {
    background: #28a745;
}

.gem-notification.error {
    background: #dc3545;
}

.gem-notification.info {
    background: #17a2b8;
}

/* Loading animation */
.gem-country-item {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Print styles */
@media print {
    .gem-actions,
    .gem-search-container,
    .gem-eligibility-checker {
        display: none !important;
    }
    
    .gem-country-item {
        break-inside: avoid;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .gem-countries-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .gem-eligibility-checker {
        text-align: center;
    }
    
    .gem-country-select {
        margin-right: 0;
        margin-bottom: 10px;
        max-width: 100%;
    }
    
    .gem-actions {
        flex-direction: column;
    }
    
    .gem-actions button {
        width: 100%;
    }
}