/**
 * Access Control Page Styles
 *
 * @package GuardDog
 * @since 1.8.0
 */

/* Feature-Specific Styles for Access Control Page */

/* Country Autocomplete Styles */
.guard-dog-country-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.guard-dog-country-suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.guard-dog-country-suggestion-item:hover,
.guard-dog-country-suggestion-item.highlighted {
    background-color: #f0f6fc;
}

.guard-dog-country-suggestion-item:last-child {
    border-bottom: none;
}

.guard-dog-country-suggestion-item .country-flag {
    font-size: 20px;
    line-height: 1;
}

.guard-dog-country-suggestion-item .country-name {
    flex: 1;
    font-weight: 500;
}

.guard-dog-country-suggestion-item .country-code {
    color: #646970;
    font-size: 12px;
    font-family: monospace;
    background: #f0f0f1;
    padding: 2px 6px;
    border-radius: 3px;
}

.guard-dog-country-suggestions-empty {
    padding: 15px;
    text-align: center;
    color: #646970;
    font-style: italic;
}

.guard-dog-user-input-wrapper {
    position: relative;
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.guard-dog-user-input-wrapper input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.guard-dog-user-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.guard-dog-user-tag {
    background: #0073aa;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.guard-dog-user-tag .remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin: 0;
}

.guard-dog-user-tag .remove-tag:hover {
    color: #ff6b6b;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 0 0 4px 4px;
}

.suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:hover {
    background: #f9f9f9;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .guard-dog-user-input-wrapper {
        flex-direction: column;
        gap: 5px;
    }
    
    .guard-dog-user-input-wrapper input[type="text"] {
        min-width: auto;
    }
    
    .suggestions {
        position: fixed;
        top: auto;
        left: 10px;
        right: 10px;
        max-height: 150px;
    }
}

.guard-dog-security-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.guard-dog-security-notice h4 {
    margin: 0 0 10px 0;
    color: #856404;
}

.guard-dog-security-notice ul {
    margin: 0;
    padding-left: 20px;
}

.guard-dog-security-notice li {
    margin-bottom: 5px;
    color: #856404;
}

.guard-dog-current-ip-section {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.guard-dog-current-ip-label {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #1976d2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guard-dog-current-ip-value {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: #1565c0;
    font-family: monospace;
}

#guard-dog-ip-blacklist-table th,
#guard-dog-ip-whitelist-table th {
    padding: 15px 10px;
}

.guard-dog-add-ip-form {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.guard-dog-add-ip-form h4 {
    margin-top: 0;
}

.guard-dog-add-ip-form .form-table {
    margin-bottom: 0;
}

.guard-dog-hidden-field {
    display: none;
}

.guard-dog-inline-message {
    display: inline-block;
    margin-left: 10px;
}

.guard-dog-message-success {
    color: #008a20;
}

.guard-dog-message-info {
    color: #2271b1;
}

.guard-dog-message-error {
    color: #d63638;
}

.guard-dog-muted-text {
    color: #646970;
    font-style: italic;
}

.guard-dog-list-empty {
    margin: 8px 0 0;
}
