/**
 * Easy Find and Replace - Admin Styles
 * 
 * @package Easy_Search_Replace
 */

/* Container Styles */
.esr-container {
    padding: 15px 0;
}

.esr-description {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* Form Table Styles */
.esr-form-table {
    margin: 0 0 20px 0;
}

.esr-form-table th {
    padding: 15px 10px 15px 0;
    width: 150px;
    font-weight: 600;
}

.esr-form-table td {
    padding: 15px 10px;
}

.esr-input {
    width: 100%;
    max-width: 500px;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.esr-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.esr-checkbox {
    margin-right: 8px;
    vertical-align: middle;
}

.esr-form-table label {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

/* Button Styles */
.esr-button-group {
    margin: 20px 0;
}

#esr_replace_btn {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    line-height: 1.5;
}

#esr_replace_btn .dashicons {
    margin-right: 6px;
    font-size: 16px;
    line-height: 1.5;
    vertical-align: middle;
}

#esr_replace_btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.dashicons-spin {
    animation: esr-spin 1s linear infinite;
}

@keyframes esr-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Message Styles */
.esr-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-left: 4px solid #ccc;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.esr-message .dashicons {
    margin-right: 8px;
    vertical-align: middle;
    font-size: 18px;
}

.esr-success {
    border-left-color: #46b450;
    background: #ecf7ed;
    color: #2c5f2e;
}

.esr-success .dashicons {
    color: #46b450;
}

.esr-error {
    border-left-color: #dc3232;
    background: #fef7f7;
    color: #761b1b;
}

.esr-error .dashicons {
    color: #dc3232;
}

.esr-warning {
    border-left-color: #ffb900;
    background: #fff8e5;
    color: #694f00;
}

.esr-warning .dashicons {
    color: #ffb900;
}

/* Responsive Styles */
@media screen and (max-width: 782px) {
    .esr-form-table th,
    .esr-form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }

    .esr-form-table th {
        padding-bottom: 5px;
    }

    .esr-input {
        max-width: 100%;
    }

    #esr_replace_btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .esr-description {
        color: #c3c4c7;
    }

    .esr-form-table label {
        color: #c3c4c7;
    }

    .esr-input {
        background: #1e1e1e;
        border-color: #555;
        color: #c3c4c7;
    }

    .esr-input:focus {
        border-color: #72aee6;
        box-shadow: 0 0 0 1px #72aee6;
    }
}

/* Accessibility Improvements */
.esr-input:focus,
.esr-checkbox:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .esr-input {
        border-width: 2px;
    }

    .esr-message {
        border-left-width: 6px;
    }
}
