/**
 * Extra Config Admin Styles
 * Styles for the Extra Config settings page
 *
 * @package AIAutoTool
 * @since 1.0.0
 */

/* ========== Settings Form ========== */
#aiautotool-extra-config-form {
    max-width: 1200px;
}

.ft-setting-row {
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
}

.ft-setting-row:last-child {
    border-bottom: none;
}

.ft-setting-row.inline-checkbox {
    padding: 8px 0;
    width: 33.33%;
    display: inline-flex;
    border-bottom: none;
}

/* ========== Toggle Switch ========== */
.nut-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
}

.nut-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nut-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.nut-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.nut-switch input:checked + .slider {
    background-color: #2271b1;
}

.nut-switch input:focus + .slider {
    box-shadow: 0 0 1px #2271b1;
}

.nut-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* ========== Labels ========== */
.ft-label-right {
    font-weight: 500;
    font-size: 14px;
    line-height: 24px;
    color: #1d2327;
    cursor: pointer;
    margin: 0;
    flex: 1;
}

/* ========== Notes/Descriptions ========== */
.ft-note {
    width: 100%;
    margin: 8px 0 0 0 !important;
    padding: 8px 12px;
    background: #f6f7f7;
    border-left: 3px solid #2271b1;
    font-size: 13px;
    line-height: 1.6;
    color: #646970;
}

.ft-note i {
    color: #2271b1;
    margin-right: 5px;
}

/* ========== Input Fields ========== */
.ft-input-small {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
}

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

.ft-input-small.error {
    border-color: #d63638;
}

.error-message {
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
}

/* ========== Section Headers ========== */
.ft-card h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
}

.ft-card h3 i {
    color: #2271b1;
    margin-right: 8px;
}

.ft-card h4 {
    margin: 20px 0 15px 0;
    color: #50575e;
    font-size: 15px;
    font-weight: 600;
}

/* ========== Actions Section ========== */
.ft-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.aiautotool-db-action {
    padding: 12px 20px !important;
    font-size: 14px !important;
    height: auto !important;
    transition: all 0.3s ease;
}

.aiautotool-db-action:hover {
    background: #f0f0f1;
    border-color: #2271b1;
    color: #2271b1;
}

.aiautotool-db-action i {
    margin-right: 8px;
}

.aiautotool-db-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#aiautotool-db-action-result {
    margin-top: 15px;
}

#aiautotool-db-action-result .notice {
    margin: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Hide Menu Grid ========== */
.hide-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

/* ========== Submit Button ========== */
.ft-submit.primary {
    background: #2271b1 !important;
    border-color: #2271b1 !important;
    color: #fff !important;
    padding: 10px 30px !important;
    font-size: 15px !important;
    height: auto !important;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ft-submit.primary:hover {
    background: #135e96 !important;
    border-color: #135e96 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ========== Cards ========== */
.ft-card {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

/* ========== Responsive Design ========== */
@media screen and (max-width: 782px) {
    .ft-setting-row {
        flex-direction: column;
    }
    
    .ft-setting-row.inline-checkbox {
        width: 100%;
    }
    
    .nut-switch {
        margin-bottom: 10px;
    }
    
    .ft-label-right {
        margin-left: 0;
    }
    
    .ft-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .hide-menu-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Loading State ========== */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* ========== Success/Error States ========== */
.notice-success {
    border-left-color: #00a32a;
}

.notice-error {
    border-left-color: #d63638;
}

/* ========== Section Spacing ========== */
.ft-card > h4:first-of-type {
    margin-top: 15px;
}

/* ========== Description Text ========== */
.description {
    color: #646970;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 5px;
    margin-bottom: 15px;
}

/* ========== Improved Readability ========== */
.ft-setting-row input[type="checkbox"]:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.ft-setting-row input[type="number"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px #2271b1;
}

/* ========== Hover Effects ========== */
.ft-setting-row:hover {
    background: #f6f7f7;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
}

/* ========== Tab Content ========== */
#tool-extra-config {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== Badge/Status Indicators ========== */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.enabled {
    background: #d7f0db;
    color: #00a32a;
}

.status-badge.disabled {
    background: #f0f0f1;
    color: #646970;
}

/* ========== Utility Classes ========== */
.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #646970;
}


