/**
 * Guard Dog CAPTCHA Page Styles
 *
 * @package GuardDog
 * @since 1.8.0
 */

/* WordPress Settings API Integration */
.guard-dog-settings-sections {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.guard-dog-settings-sections .form-table {
    margin-top: 0;
}

.guard-dog-settings-sections .form-table th {
    padding: 15px 10px 15px 0;
    width: 200px;
    line-height: 1.3;
    vertical-align: top;
}

.guard-dog-settings-sections .form-table td {
    padding: 15px 10px;
    line-height: 1.3;
    vertical-align: middle;
}

.guard-dog-settings-sections .form-table input[type="text"],
.guard-dog-settings-sections .form-table input[type="password"],
.guard-dog-settings-sections .form-table input[type="number"],
.guard-dog-settings-sections .form-table select {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.guard-dog-settings-sections .form-table input[type="text"]:focus,
.guard-dog-settings-sections .form-table input[type="password"]:focus,
.guard-dog-settings-sections .form-table input[type="number"]:focus,
.guard-dog-settings-sections .form-table select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.guard-dog-settings-sections .description {
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* Provider configuration sections - hidden by default */
.guard-dog-provider-fields {
    display: none;
}

/* Show active provider configuration */
.guard-dog-provider-fields.active {
    display: block;
}

/* Form Sections */
.guard-dog-form-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.guard-dog-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guard-dog-form-section h3 .dashicons {
    color: #0073aa;
}

/* Radio Grid */
.guard-dog-radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.guard-dog-radio-item {
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    padding: 15px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.guard-dog-radio-item:hover {
    border-color: #0073aa;
    background: #f9f9f9;
}

.guard-dog-radio-item.selected {
    border-color: #0073aa;
    background: #f0f8ff;
}

.guard-dog-radio-item label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 8px;
}

.guard-dog-radio-item input[type="radio"] {
    margin: 0;
}

.guard-dog-radio-item strong {
    font-size: 16px;
    color: #23282d;
}

.guard-dog-provider-info {
    color: #666;
    font-size: 14px;
    margin-left: 25px;
}

/* Provider Fields */
.guard-dog-provider-fields {
    display: none;
}

.guard-dog-provider-fields.active {
    display: block;
}

.guard-dog-form-table {
    width: 100%;
    border-collapse: collapse;
}

.guard-dog-form-table th {
    text-align: left;
    padding: 12px 0;
    width: 30%;
    color: #23282d;
    font-weight: 600;
}

.guard-dog-form-table td {
    padding: 12px 0;
}

.guard-dog-form-table input[type="text"],
.guard-dog-form-table input[type="number"],
.guard-dog-form-table select {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 14px;
}

.guard-dog-form-table input[type="text"]:focus,
.guard-dog-form-table input[type="number"]:focus,
.guard-dog-form-table select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.guard-dog-form-table .description {
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* Cards */
.guard-dog-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.guard-dog-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

/* Status Indicator */
.guard-dog-status-indicator {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.guard-dog-status-indicator.enabled {
    background: #d4edda;
    color: #155724;
}

.guard-dog-status-indicator.disabled {
    background: #f8d7da;
    color: #721c24;
}

.guard-dog-status-details {
    margin: 8px 0;
    font-size: 14px;
}

.guard-dog-status-details strong {
    color: #23282d;
}

.guard-dog-status-warning {
    color: #856404;
    background: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ffeaa7;
    margin: 10px 0;
}

.guard-dog-status-info {
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

/* Help Sections */
.guard-dog-help-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.guard-dog-help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.guard-dog-help-section h4 {
    margin: 0 0 10px 0;
    color: #23282d;
    font-size: 14px;
    font-weight: 600;
}

.guard-dog-help-section ol {
    margin: 10px 0;
    padding-left: 20px;
}

.guard-dog-help-section li {
    margin-bottom: 5px;
    color: #666;
    font-size: 13px;
}

.guard-dog-help-section p {
    margin: 10px 0;
}

.guard-dog-help-section a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.guard-dog-help-section a:hover {
    text-decoration: underline;
}

.guard-dog-help-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.guard-dog-help-section ul li {
    margin-bottom: 8px;
    color: #666;
    font-size: 13px;
}

.guard-dog-help-section ul li strong {
    color: #23282d;
}

/* Submit Button */
.guard-dog-settings-form .submit {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Secret Key Field States */
.guard-dog-form-table input[type="password"],
.guard-dog-settings-sections .form-table input[type="password"] {
    width: 100%;
    max-width: 400px;
    padding: 8px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.guard-dog-form-table input[type="password"]:focus,
.guard-dog-settings-sections .form-table input[type="password"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

/* Obfuscated key - existing key that's hidden */
.guard-dog-form-table input[type="password"].guard-dog-obfuscated-key,
.guard-dog-settings-sections .form-table input[type="password"].guard-dog-obfuscated-key {
    background: #f9f9f9;
    border-color: #28a745;
    color: #666;
    font-family: monospace;
}

.guard-dog-form-table input[type="password"].guard-dog-obfuscated-key:focus,
.guard-dog-settings-sections .form-table input[type="password"].guard-dog-obfuscated-key:focus {
    border-color: #0073aa;
    background: #fff;
}

/* Editing key - user is entering a new key */
.guard-dog-form-table input[type="password"].guard-dog-editing-key,
.guard-dog-settings-sections .form-table input[type="password"].guard-dog-editing-key {
    border-color: #ffc107;
    background: #fffbf0;
}

.guard-dog-form-table input[type="password"].guard-dog-editing-key:focus,
.guard-dog-settings-sections .form-table input[type="password"].guard-dog-editing-key:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 1px #ff9800;
}

/* New key - user has entered a new key */
.guard-dog-form-table input[type="password"].guard-dog-new-key,
.guard-dog-settings-sections .form-table input[type="password"].guard-dog-new-key {
    border-color: #17a2b8;
    background: #f0f9ff;
}

.guard-dog-form-table input[type="password"].guard-dog-new-key:focus,
.guard-dog-settings-sections .form-table input[type="password"].guard-dog-new-key:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 1px #007bff;
}

/* Additional visual indicators */
.guard-dog-form-table input[type="password"].guard-dog-obfuscated-key::before,
.guard-dog-settings-sections .form-table input[type="password"].guard-dog-obfuscated-key::before {
    content: "🔑";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Key status descriptions */
.guard-dog-key-status {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.guard-dog-key-status .dashicons {
    font-size: 14px;
}

.guard-dog-key-status.configured {
    color: #28a745;
}

.guard-dog-key-status.editing {
    color: #ffc107;
}

.guard-dog-key-status.new {
    color: #17a2b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .guard-dog-radio-grid {
        grid-template-columns: 1fr;
    }
    
    .guard-dog-form-table th,
    .guard-dog-form-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }
    
    .guard-dog-form-table th {
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 5px;
    }
    
    .guard-dog-settings-sections .form-table th,
    .guard-dog-settings-sections .form-table td {
        display: block;
        width: 100%;
        padding: 8px 0;
    }
    
    .guard-dog-settings-sections .form-table th {
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 5px;
    }
} 
