/* Admin Styles */
:root {
    --st-primary: #2271b1;
    --st-border: #c3c4c7;
    --st-text: #1d2327;
    --st-text-light: #646970;
    --st-bg: #f0f0f1;
    --st-white: #fff;
    --st-success: #00a32a;
    --st-error: #d63638;
    --st-shadow: rgba(0, 0, 0, 0.05);
}

/* Common styles */
.small-tools-section,
.small-tools-preview {
    background: var(--st-white);
    border: 1px solid var(--st-border);
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
}

/* Custom Toggle Switch */
.small-tools-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.small-tools-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.small-tools-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.small-tools-toggle .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--st-white);
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 1px 3px var(--st-shadow);
}

.small-tools-toggle input:checked + .slider {
    background-color: var(--st-primary);
}

.small-tools-toggle input:checked + .slider:before {
    transform: translateX(20px);
}

/* Description text */
.description {
    color: var(--st-text-light);
    font-style: normal;
    margin-top: 5px;
}

/* Media uploader */
.small-tools-media-upload .button {
    margin: 0 5px;
}

/* Color picker */
.wp-picker-container {
    display: inline-block;
}

.wp-picker-container .wp-color-result.button {
    margin: 0 6px 0 0;
}

/* Spinner */
.small-tools-spinner {
    float: none;
    margin: 4px 10px 0;
    vertical-align: middle;
}

/* Notice */
.small-tools-save-notice {
    position: fixed;
    top: 32px;
    right: 20px;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 9999;
    display: none;
    box-shadow: 0 2px 8px var(--st-shadow);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.small-tools-save-notice.success {
    background: var(--st-success);
    color: var(--st-white);
}

.small-tools-save-notice.error {
    background: var(--st-error);
    color: var(--st-white);
}

/* Forms */
.form-table th {
    width: 250px;
    padding: 20px 10px 20px 0;
}

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

/* Sections */
.small-tools-section-title {
    margin: 0 0 20px;
    padding: 0 0 10px;
    border-bottom: 1px solid #dcdcde;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
}

/* Accordion Styles */
.small-tools-accordion {
    margin-bottom: 15px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: #fff;
}

.small-tools-accordion-header {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #ccd0d4;
    background: #f8f9fa;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.small-tools-accordion-header:hover {
    background: #f0f0f1;
}

.small-tools-accordion-header h3 {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
}

.small-tools-accordion-header::after {
    content: '\f347';
    font-family: dashicons;
    font-size: 20px;
    color: #72777c;
    transition: transform 0.2s ease;
}

.small-tools-accordion-header.active::after {
    transform: rotate(180deg);
}

.small-tools-accordion-content {
    display: none;
    padding: 20px;
    border-top: 1px solid #ccd0d4;
    background: #fff;
}

.small-tools-accordion-content.active {
    display: block;
}

/* Smooth transition for accordion content */
.small-tools-accordion-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.small-tools-accordion-content.active {
    max-height: 2000px; /* Large enough to accommodate content */
}

/* Ensure form elements inside accordion are properly styled */
.small-tools-accordion-content .form-table {
    margin: 0;
}

.small-tools-accordion-content .form-table th {
    padding-top: 10px;
    padding-bottom: 10px;
}

.small-tools-accordion-content .form-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Description text styling */
.small-tools-accordion-content .description {
    margin-top: 5px;
    color: #666;
}

/* Notice styling inside accordion */
.small-tools-accordion-content .notice {
    margin: 10px 0;
    padding: 8px 12px;
}
