/* Admin Settings Page Styles */
.byteplugs-admin-wrap {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.byteplugs-admin-wrap h1 {
    display: flex;
    align-items: center;
    color: #1d2327;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f1;
}

/* Toggle Switch */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background-color: #00a32a;
    color: white;
}

.status-inactive {
    background-color: #d63638;
    color: white;
}

input:checked + .slider {
    background-color: #2271b1;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2271b1;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Settings Sections */
.byteplugs-settings-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.byteplugs-settings-section h2 {
    display: flex;
    align-items: center;
    margin: 0 0 20px;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.byteplugs-description {
    color: #646970;
    font-size: 14px;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* Input Fields */
.byteplugs-admin-wrap input[type="text"],
.byteplugs-admin-wrap input[type="password"] {
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 8px 12px;
    height: 40px;
    width: 100%;
    max-width: 400px;
    font-size: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.byteplugs-admin-wrap input[type="text"]:focus,
.byteplugs-admin-wrap input[type="password"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* Button Templates Section */
.byteplugs-button-templates {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.template-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.template-option {
    position: relative;
    cursor: pointer;
}

.template-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.template-preview {
    padding: 20px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.template-preview:hover {
    border-color: #2271b1;
    background: #f0f7fc;
    transform: translateY(-1px);
}

.template-option input[type="radio"]:checked + .template-preview,
.template-preview.active {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px #2271b1;
    background: #f0f7fc;
}

/* Button Template Styles */
.template-preview .preview-btn {
    padding: 12px 24px;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.template-preview.modern .preview-btn {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.template-preview.rounded .preview-btn {
    border-radius: 50px;
    font-weight: 600;
}

.template-preview.minimal .preview-btn {
    border-radius: 4px;
    border-width: 1px;
}

.template-preview.classic .preview-btn {
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Color Picker Fields */
.byteplugs-admin-wrap input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 2px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
}

.color-code {
    display: inline-block;
    margin-left: 10px;
    font-family: monospace;
    color: #666;
}

/* Test Connection Button */
.test-connection-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-connection-btn:hover {
    background: #135e96;
}

.test-connection-btn:disabled {
    background: #c3c4c7;
    cursor: not-allowed;
}

.test-connection-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.test-connection-btn .dashicons.dashicons-rotate {
    animation: rotating 1s linear infinite;
}

/* Test Result Messages */
.test-result {
    margin-left: 15px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.test-result.success {
    color: #00a32a;
}

.test-result.error {
    color: #d63638;
}

/* Submit Button */
.byteplugs-admin-wrap .submit {
    padding: 20px 0 0;
    margin: 0;
    border-top: 1px solid #f0f0f1;
}

.byteplugs-admin-wrap .button-primary {
    background: #2271b1;
    border: none;
    padding: 8px 20px;
    height: auto;
    line-height: 1.4;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Field Descriptions */
.form-table td p.description {
    margin-top: 8px;
    color: #666;
}

/* Animations */
@keyframes rotating {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .template-options {
        grid-template-columns: 1fr;
    }
    
    .template-preview .preview-btn {
        max-width: none;
    }
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background-color: #00a32a;
    color: white;
}

.status-inactive {
    background-color: #d63638;
    color: white;
}

.check-status-btn, .check-updates-btn {
    margin-right: 10px !important;
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}