/**
 * Awesome Coming Soon - Admin Styles
 * Modern, clean admin interface
 */

/* ==========================================
   Reset & Base
   ========================================== */
.acs-admin-wrap {
    margin: 0;
    padding: 0;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e1e1e;
    line-height: 1.5;
    background: #f0f0f1;
}

.acs-admin-wrap * {
    box-sizing: border-box;
}

/* ==========================================
   Header
   ========================================== */
.acs-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    padding: 0 24px;
    margin-left: -20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.acs-header .acs-logo {
    max-height: 36px;
    width: auto;
}

.acs-header-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
}

.acs-mode-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.acs-status-indicator {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.acs-status-indicator.acs-active {
    background: #00d084;
    color: #fff;
}

.acs-status-indicator.acs-inactive {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.acs-header .acs-preview-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.acs-header .acs-preview-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ==========================================
   Navigation Tabs
   ========================================== */
.acs-tabs {
    background: #fff;
    padding: 0 24px;
    margin: 0 0 0 -20px;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.acs-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #50575e;
    text-decoration: none;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.acs-tabs a:hover {
    color: #1e3a5f;
    background: #f8f9fa;
}

.acs-tabs a.acs-tab-active {
    color: #1e3a5f;
    border-bottom-color: #1e3a5f;
    background: #fff;
}

.acs-tabs a .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ==========================================
   Main Container
   ========================================== */
.acs-admin-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: start;
    gap: 24px;
    padding: 24px;
    margin-left: -20px;
    min-height: calc(100vh - 200px);
}

.acs-admin-content {
    min-width: 0;
}

#acs-settings-form {
    margin: 0;
}

.acs-admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ==========================================
   Settings Box
   ========================================== */
.acs-settings-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
}

.acs-section-title {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f1;
    background: #fafafa;
}

.acs-section-title h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
}

.acs-settings-fields-box {
    padding: 24px;
}

/* ==========================================
   Quick Toggle Card (Dashboard)
   ========================================== */
.acs-quick-toggle {
    padding: 24px;
}

.acs-toggle-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e8e8e8;
    border-radius: 12px;
}

.acs-toggle-info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
}

.acs-toggle-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* ==========================================
   Toggle Switch
   ========================================== */
.acs-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

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

.acs-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.acs-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.acs-switch input:checked + .acs-slider {
    background: linear-gradient(135deg, #00d084 0%, #00a067 100%);
}

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

.acs-switch input:focus + .acs-slider {
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.2);
}

/* ==========================================
   Mode Selector
   ========================================== */
.acs-mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.acs-mode-option {
    cursor: pointer;
}

.acs-mode-option input {
    display: none;
}

.acs-mode-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.acs-mode-option:hover .acs-mode-card {
    border-color: #1e3a5f;
    background: #f8f9fa;
}

.acs-mode-option.acs-selected .acs-mode-card,
.acs-mode-option input:checked + .acs-mode-card {
    border-color: #1e3a5f;
    background: linear-gradient(135deg, #f0f4f8 0%, #fff 100%);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.15);
}

.acs-mode-card strong {
    font-size: 15px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 6px;
}

.acs-mode-card span {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* ==========================================
   Form Fields
   ========================================== */
.acs-field-wrapper {
    margin-bottom: 24px;
}

.acs-field-wrapper:last-child {
    margin-bottom: 0;
}

.acs-field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 8px;
}

.acs-field-wrapper input[type="text"],
.acs-field-wrapper input[type="url"],
.acs-field-wrapper input[type="email"],
.acs-field-wrapper input[type="number"],
.acs-field-wrapper input[type="date"],
.acs-field-wrapper input[type="datetime-local"],
.acs-field-wrapper select,
.acs-field-wrapper textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s ease;
}

.acs-field-wrapper input:focus,
.acs-field-wrapper select:focus,
.acs-field-wrapper textarea:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
    outline: none;
}

.acs-field-wrapper textarea {
    min-height: 100px;
    resize: vertical;
    max-width: 100%;
}

/* Select Fields */
.acs-field-wrapper select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Datetime-local input */
.acs-field-wrapper input[type="datetime-local"] {
    max-width: 280px;
}

/* Required field indicator */
.acs-field-required:after {
    content: " *";
    color: #dc3232;
}

/* Field with help text inline */
.acs-field-inline-help {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acs-field-inline-help input {
    flex: 1;
}

/* Horizontal form fields */
.acs-fields-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.acs-fields-row .acs-field-wrapper {
    flex: 1;
    min-width: 200px;
}

/* Small field variant */
.acs-field-small input,
.acs-field-small select {
    max-width: 200px !important;
}

/* Full width field */
.acs-field-full input,
.acs-field-full select,
.acs-field-full textarea {
    max-width: 100% !important;
}

.acs-field-wrapper .description {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* Radio Wrapper */
.acs-radio-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.acs-radio-wrapper label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.acs-radio-wrapper label:hover {
    border-color: #1e3a5f;
    background: #f8f9fa;
}

.acs-radio-wrapper input:checked + span,
.acs-radio-wrapper input[type="radio"]:checked ~ * {
    color: #1e3a5f;
}

/* Checkbox Group */
.acs-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.acs-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.acs-checkbox-group label:hover {
    border-color: #1e3a5f;
}

/* ==========================================
   Color Picker
   ========================================== */
.acs-field-color .acs-field-label {
    margin-bottom: 12px;
}

.acs-color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.acs-color-grid .acs-field-wrapper {
    margin-bottom: 0;
}

.acs-palette-pro-box {
    border-top: 1px solid #e2e8f0;
    margin-top: 22px;
    padding-top: 18px;
}

.acs-palette-pro-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.acs-palette-pro-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.acs-palette-pro-box .description {
    margin: 0 0 14px;
    color: #64748b;
}

.acs-palette-pro-create {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 860px;
    margin: 8px 0 12px;
}

.acs-palette-pro-create .acs-palette-name-input {
    flex: 1 1 520px;
    max-width: 520px;
}

.acs-palette-pro-create .acs-save-current-palette {
    flex: 0 0 auto;
    white-space: nowrap;
}

.acs-palette-pro-create .button[disabled] {
    opacity: 0.8;
    cursor: not-allowed;
}

.acs-palette-pro-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.acs-palette-pro-list .button[disabled] {
    opacity: 0.75;
    cursor: not-allowed;
}

.acs-palette-swatch-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.acs-palette-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.2);
}

.acs-palette-pro-hint {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 13px;
}

.acs-palette-preview-dropdown {
    max-width: 100%;
}

.acs-palette-option-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.acs-palette-option-name {
    line-height: 1.2;
    white-space: nowrap;
}

/* WordPress-like color picker */
.wp-picker-container {
    display: inline-block;
}

.wp-picker-container .wp-color-result {
    height: 34px;
    margin: 0;
    border-radius: 4px;
    border: 1px solid #2271b1;
    box-shadow: none;
}

.wp-picker-container .wp-color-result .wp-color-result-text {
    background: #fff;
    border-left: 1px solid #dcdcde;
    border-radius: 0 3px 3px 0;
    color: #3c434a;
    display: block;
    line-height: 32px;
    margin-left: 30px;
    padding: 0 12px;
}

.wp-picker-container .wp-color-result:hover,
.wp-picker-container .wp-color-result:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.wp-picker-container .wp-picker-holder {
    z-index: 1000;
}

/* ==========================================
   Image Upload
   ========================================== */
.acs-image-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.acs-image-upload .button {
    margin-right: 8px;
}

.acs-image-preview {
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: inline-block;
}

.acs-image-preview img {
    max-width: 200px;
    height: auto;
    display: block;
    border-radius: 4px;
}

.acs-video-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.acs-video-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.acs-video-preview {
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: inline-block;
}

.acs-video-preview video {
    width: min(100%, 320px);
    max-height: 180px;
    display: block;
    border-radius: 6px;
    background: #111827;
}

.acs-video-poster-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.acs-video-poster-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.acs-video-poster-preview {
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.acs-video-poster-preview img {
    width: min(100%, 240px);
    height: auto;
    display: block;
    border-radius: 6px;
}

/* ==========================================
   Range Slider
   ========================================== */
.acs-range-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 400px;
}

.acs-range-wrapper input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

.acs-range-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #1e3a5f;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.acs-range-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.acs-range-value {
    min-width: 50px;
    padding: 6px 12px;
    background: #f0f0f1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* ==========================================
   Font Customization
   ========================================== */
.acs-font-customization {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.acs-font-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
}

.acs-font-section h3 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1e1e1e;
}

.acs-font-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 16px;
}

/* ==========================================
   Theme Grid
   ========================================== */
.acs-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.acs-theme-item {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.acs-theme-item:hover {
    border-color: #1e3a5f;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.acs-theme-item.acs-active {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.2);
}

.acs-theme-item input[type="radio"] {
    display: none;
}

.acs-theme-preview {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acs-theme-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acs-theme-preview-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.acs-theme-item label {
    display: block;
    cursor: pointer;
}

.acs-theme-name {
    display: block;
    padding: 14px 16px 4px;
    font-size: 14px;
    font-weight: 600;
    color: #1e1e1e;
}

.acs-theme-desc {
    display: block;
    padding: 0 16px 14px;
    font-size: 12px;
    color: #666;
}

.acs-premium-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   Social Links Grid
   ========================================== */
.acs-social-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.acs-social-link-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    transition: all 0.2s ease;
}

.acs-social-link-item:hover {
    border-color: #1e3a5f;
}

.acs-social-icon-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1e1e1e;
    margin-bottom: 10px;
}

.acs-social-icon-label i {
    font-size: 18px;
    color: #1e3a5f;
    width: 24px;
    text-align: center;
}

.acs-social-link-item input {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

.acs-social-link-item input:focus {
    border-color: #1e3a5f;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.1);
}

/* ==========================================
   Secret Link Display
   ========================================== */
.acs-secret-link-display {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.acs-secret-link-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 13px;
    font-family: monospace;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

/* ==========================================
   Code Editor
   ========================================== */
.acs-code-editor {
    width: 100%;
    min-height: 300px;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
    padding: 16px;
    background: #1e1e1e;
    color: #d4d4d4;
    border: none;
    border-radius: 8px;
}

.CodeMirror {
    height: auto;
    min-height: 300px;
    border-radius: 8px;
    font-size: 13px;
}

/* ==========================================
   Save Bar
   ========================================== */
.acs-save-bar {
    padding: 20px 0;
    margin-top: 8px;
}

.acs-save-changes {
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.3);
}

.acs-save-changes:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.4);
}

.acs-save-changes:active {
    transform: translateY(0);
}

/* ==========================================
   Sidebar
   ========================================== */
.acs-upgrade-box {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: #fff;
    padding: 24px;
    border-radius: 12px;
}

.acs-upgrade-box h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
}

.acs-upgrade-box p {
    margin: 0 0 16px;
    font-size: 14px;
    opacity: 0.9;
}

.acs-upgrade-box ul {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.acs-upgrade-box li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 10px;
}

.acs-upgrade-box li:before {
    content: "✓";
    font-weight: bold;
    color: #00d084;
}

.acs-upgrade-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #fff;
    color: #1e3a5f;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.acs-upgrade-btn:hover {
    background: #f0f0f1;
    color: #1e3a5f;
    transform: translateY(-1px);
}

.acs-sidebar-widget {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.acs-sidebar-widget h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #1e1e1e;
}

.acs-sidebar-widget p {
    margin: 0 0 16px;
    font-size: 14px;
    color: #666;
}

.acs-review-stars {
    margin-bottom: 16px;
    color: #f59e0b;
    font-size: 20px;
}

.acs-sidebar-widget .button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
}


.acs-admin-sidebar .acs-review-box {
    margin-top: 20px;
}
.acs-plugin-version {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 10px;
}

/* ==========================================
   Danger Zone
   ========================================== */
.acs-danger-zone {
    border: 1px solid #fee2e2;
}

.acs-danger-zone .acs-section-title {
    background: #fef2f2;
}

.acs-danger-zone .acs-section-title h2 {
    color: #dc2626;
}

.button-danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.button-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

/* ==========================================
   Subscribers Table
   ========================================== */
.acs-subscribers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.acs-subscribers-count {
    font-size: 14px;
    color: #666;
}

.acs-subscribers-count strong {
    color: #1e3a5f;
    font-size: 24px;
}

.acs-subscribers-actions {
    display: flex;
    gap: 10px;
}

.acs-subscribers-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.acs-subscribers-table th,
.acs-subscribers-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f1;
}

.acs-subscribers-table th {
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.acs-subscribers-table tr:hover {
    background: #fafafa;
}

.acs-no-subscribers {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* ==========================================
   Notification
   ========================================== */
.acs-notification {
    position: fixed;
    top: 40px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 999999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.acs-notification.acs-show {
    opacity: 1;
    transform: translateX(0);
}

.acs-notification-success {
    background: linear-gradient(135deg, #00d084 0%, #00a067 100%);
}

.acs-notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* ==========================================
   Responsive
   ========================================== */
@media screen and (max-width: 1200px) {
    .acs-admin-container {
        grid-template-columns: 1fr;
    }

    .acs-admin-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media screen and (max-width: 960px) {
    .acs-mode-selector {
        grid-template-columns: 1fr;
    }

    .acs-font-customization {
        grid-template-columns: 1fr;
    }

    .acs-social-links-grid {
        grid-template-columns: 1fr;
    }

    .acs-color-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 782px) {
    .acs-header {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
    }

    .acs-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .acs-tabs a {
        white-space: nowrap;
        padding: 14px 16px;
        font-size: 12px;
    }

    .acs-admin-container {
        padding: 16px;
    }

    .acs-toggle-card {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .acs-color-grid {
        grid-template-columns: 1fr;
    }

    .acs-theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .acs-theme-grid {
        grid-template-columns: 1fr;
    }
}

/* WordPress Admin Adjustments */
body.folded .acs-header,
body.folded .acs-tabs,
body.folded .acs-admin-container {
    margin-left: 0;
}

/* Select2 Override if used */
.acs-select2 {
    width: 100% !important;
    max-width: 500px;
}

/* ==========================================
   WordPress Editor (TinyMCE)
   ========================================== */
.acs-field-editor .wp-editor-wrap {
    max-width: 100%;
}

.acs-field-editor .wp-editor-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.acs-field-editor .mce-panel {
    border-color: #ddd !important;
}

.acs-field-editor .mce-toolbar-grp {
    background: #f8f9fa !important;
    border-bottom: 1px solid #ddd !important;
}

.acs-field-editor .wp-editor-area {
    border: none !important;
    padding: 15px;
}

.acs-field-editor .quicktags-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 5px;
}

/* ==========================================
   Additional Form Elements
   ========================================== */
/* Checkbox styling */
.acs-field-checkbox .acs-switch {
    margin-top: 2px;
}

/* Help tooltips */
.acs-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 6px;
    cursor: help;
}

.acs-tooltip .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #999;
}

.acs-tooltip:hover .dashicons {
    color: #1e3a5f;
}

.acs-tooltip-content {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e1e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 8px;
}

.acs-tooltip:hover .acs-tooltip-content {
    display: block;
}

.acs-tooltip-content:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e1e1e;
}

/* Info boxes */
.acs-info-box {
    background: #e8f4fc;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.acs-info-box .dashicons {
    color: #0073aa;
    flex-shrink: 0;
}

.acs-info-box p {
    margin: 0;
    font-size: 13px;
    color: #004085;
}

.acs-warning-box {
    background: #fff3cd;
    border-color: #ffc107;
}

.acs-warning-box .dashicons {
    color: #856404;
}

.acs-warning-box p {
    color: #856404;
}

/* Divider */
.acs-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 30px 0;
}

/* Section descriptions */
.acs-section-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Button row */
.acs-button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

/* Loading overlay */
.acs-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.acs-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: acs-spin 0.8s linear infinite;
}

@keyframes acs-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status badges */
.acs-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.acs-badge-success {
    background: #d4edda;
    color: #155724;
}

.acs-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.acs-badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.acs-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Empty state styling */
.acs-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #666;
}

.acs-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ccc;
    margin-bottom: 16px;
}

.acs-empty-state h3 {
    margin: 0 0 8px;
    color: #1e1e1e;
    font-size: 18px;
}

.acs-empty-state p {
    margin: 0;
    font-size: 14px;
}


/* ==========================================
   Modern UI Overrides (Style Set A)
   ========================================== */
.acs-admin-wrap {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #eef1f5;
}

.acs-header {
    background: linear-gradient(120deg, #0b1220 0%, #13213a 55%, #1f3557 100%);
}

.acs-section-title h2,
.acs-settings-box h3,
.acs-settings-box h4 {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.acs-settings-box {
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(18, 26, 38, 0.08);
}

.acs-section-title {
    background: #f7f8fb;
}

.acs-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.acs-theme-item {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.acs-theme-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.acs-theme-preview {
    height: 140px;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 12px;
}

.acs-theme-preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.64));
}

.acs-theme-preview-text {
    position: relative;
    z-index: 2;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.acs-premium-label {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: #0f172a;
    color: #fff;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 0.08em;
}

.acs-theme-pro-note {
    background: #0f172a;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.acs-pro-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.acs-pro-callout {
    background: linear-gradient(120deg, rgba(59,130,246,0.12), rgba(14,165,233,0.08));
    border: 1px solid rgba(59,130,246,0.25);
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.acs-pro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.acs-pro-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
}

.acs-pro-card h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.acs-pro-card input[type="text"] {
    margin-bottom: 10px;
    width: 100%;
}

.acs-theme-item input:disabled + .acs-theme-preview {
    opacity: 0.55;
}


/* Show full Pro template thumbs without cropping */
.acs-theme-item.acs-premium-theme .acs-theme-preview {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-color: #0b1220;
}


.acs-pro-card input[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ==========================================
   Input and Button Refresh
   ========================================== */
.acs-field-wrapper {
    margin-bottom: 18px;
}

.acs-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0f172a;
}

.acs-field-wrapper input[type="text"],
.acs-field-wrapper input[type="url"],
.acs-field-wrapper input[type="email"],
.acs-field-wrapper input[type="number"],
.acs-field-wrapper input[type="datetime-local"],
.acs-field-wrapper textarea,
.acs-field-wrapper select,
.acs-pro-card input[type="text"],
.acs-pro-card input[type="url"] {
    width: 100%;
    border: 1px solid #d1d9e6;
    border-radius: 12px;
    min-height: 42px;
    padding: 10px 12px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.acs-field-wrapper select option:disabled {
    color: #8c96a8;
    font-style: italic;
}

.acs-field-wrapper select.acs-native-select-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(100%) !important;
    white-space: nowrap !important;
}

.acs-custom-select {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.acs-custom-select.is-open {
    z-index: 250;
}

.acs-custom-select-trigger {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d1d9e6;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.3;
}

.acs-custom-select.is-open .acs-custom-select-trigger,
.acs-custom-select-trigger:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.acs-custom-select-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid #475569;
    border-bottom: 2px solid #475569;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.16s ease;
    flex-shrink: 0;
}

.acs-custom-select.is-open .acs-custom-select-arrow {
    transform: rotate(-135deg) translateY(-1px);
}

.acs-custom-select-menu {
    position: absolute;
    z-index: 260;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    width: 100%;
    margin-top: 0;
    max-height: 320px;
    background: #fff;
    border: 1px solid #d1d9e6;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    overflow-x: hidden;
    overflow-y: auto;
}

.acs-custom-select-option {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
    color: #0f172a;
    padding: 11px 12px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.acs-custom-select-option:last-child {
    border-bottom: 0;
}

.acs-custom-select-option:hover {
    background: #f8fbff;
}

.acs-custom-select-option.is-selected {
    background: #edf5ff;
    color: #0f2a4a;
    font-weight: 600;
}

.acs-custom-select-option.is-disabled {
    color: #94a3b8;
    background: #f8fafc;
    cursor: not-allowed;
}

.acs-custom-select-option-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: #fff3cd;
    color: #7a5b00;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* Keep custom dropdown menus floating above following sections. */
.acs-settings-box,
.acs-settings-box .acs-settings-fields-box {
    overflow: visible !important;
}

.acs-field-wrapper textarea {
    min-height: 108px;
}

.acs-field-wrapper input:focus,
.acs-field-wrapper textarea:focus,
.acs-field-wrapper select:focus,
.acs-pro-card input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.acs-save-bar {
    position: sticky;
    bottom: 12px;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    padding: 12px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    backdrop-filter: blur(8px);
}

.acs-save-changes,
.acs-template-preview-btn,
.acs-upgrade-btn,
.acs-preview-btn,
.acs-settings-box .button.button-primary {
    border-radius: 12px !important;
    min-height: 40px;
    padding: 0 16px !important;
    font-weight: 600;
}

.acs-template-preview-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 12px 14px;
    width: calc(100% - 24px);
    min-height: 38px;
    border-radius: 10px !important;
    background: #ffffff !important;
    border: 1px solid #c9d4e4 !important;
    color: #1e3a5f !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.acs-template-preview-btn:hover {
    background: #eff5fc !important;
    border-color: #8da8c9 !important;
    color: #1e3a5f !important;
}

.acs-template-preview-btn .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
}

button.button.acs-template-preview-btn {
    margin-left: 10px;
    margin-bottom: 10px;
}

/* ==========================================
   Content + Global Field Width/Border
   ========================================== */
.acs-content-inline-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 22px;
}

.acs-content-inline-fields .acs-field-wrapper {
    margin-bottom: 0;
}

.acs-settings-fields-box .acs-field-wrapper {
    margin-bottom: 20px;
}

.acs-settings-fields-box .acs-field-wrapper:last-child {
    margin-bottom: 0;
}

.acs-field-wrapper input[type="text"],
.acs-field-wrapper input[type="url"],
.acs-field-wrapper input[type="email"],
.acs-field-wrapper input[type="number"],
.acs-field-wrapper input[type="password"],
.acs-field-wrapper input[type="search"],
.acs-field-wrapper input[type="date"],
.acs-field-wrapper input[type="datetime-local"],
.acs-field-wrapper select,
.acs-field-wrapper textarea,
.acs-social-link-item input[type="url"],
.acs-secret-link-input {
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid #d0d0d0 !important;
}

.acs-field-editor .wp-editor-wrap,
.acs-field-editor .wp-editor-container,
.acs-field-editor .mce-tinymce,
.acs-field-editor .quicktags-toolbar {
    border-color: #d0d0d0 !important;
}

@media screen and (max-width: 960px) {
    .acs-content-inline-fields {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Template Preview Modal
   ========================================== */
.acs-modal-open {
    overflow: hidden;
}

.acs-template-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.acs-template-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.6);
}

.acs-template-preview-dialog {
    position: relative;
    width: min(1200px, calc(100vw - 40px));
    height: min(760px, calc(100vh - 60px));
    margin: 30px auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
}

.acs-template-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.acs-template-preview-header h3 {
    margin: 0;
}

.acs-template-preview-close {
    font-size: 30px;
    text-decoration: none;
    color: #1e293b;
    line-height: 1;
}

.acs-template-preview-body {
    height: calc(100% - 60px);
}

#acs-template-preview-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #0f172a;
}

/* ==========================================
   First Tab UX Polish
   ========================================== */
.acs-settings-box {
    border: 1px solid #d9dee8;
    background: #ffffff;
}

.acs-section-title {
    background: #f2f4f8;
    border-bottom: 1px solid #e4e9f2;
}

.acs-section-title h2 {
    font-size: 16px;
}

.acs-settings-fields-box {
    padding: 30px;
}

.acs-mode-selector {
    gap: 18px;
}

.acs-mode-option .acs-mode-card {
    min-height: 122px;
    border-radius: 18px;
    border: 2px solid #d6dde8;
    padding: 24px 22px;
}

.acs-mode-option .acs-mode-card strong {
    font-size: 18px;
    letter-spacing: -0.01em;
}

.acs-mode-option .acs-mode-card span {
    font-size: 14px;
    color: #5d6676;
}

.acs-mode-option:hover .acs-mode-card {
    border-color: #3a5d88;
    background: #fbfdff;
}

.acs-mode-option.acs-selected .acs-mode-card,
.acs-mode-option input:checked + .acs-mode-card {
    border-color: #294d7e;
    background: linear-gradient(180deg, #f3f7fd 0%, #ffffff 100%);
    box-shadow: 0 8px 22px rgba(41, 77, 126, 0.18);
}

.acs-radio-wrapper {
    gap: 14px;
}

.acs-radio-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 20px;
    border: 1px solid #ccd5e3;
    border-radius: 14px;
    background: #f8fafe;
    cursor: pointer;
    transition: all 0.2s ease;
}

.acs-radio-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.acs-radio-pill .acs-radio-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #9aa7bd;
    background: #fff;
    position: relative;
}

.acs-radio-pill .acs-radio-indicator::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1f6fb2;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.18s ease;
}

.acs-radio-pill .acs-radio-text {
    font-size: 16px;
    font-weight: 600;
    color: #2f3a4a;
}

.acs-radio-pill:hover {
    border-color: #6684ad;
    background: #ffffff;
}

.acs-radio-pill input:checked + .acs-radio-indicator,
.acs-radio-pill input:checked + .acs-radio-indicator + .acs-radio-text {
    color: #2e5e94;
}

.acs-radio-pill input:checked + .acs-radio-indicator {
    border-color: #2e5e94;
}

.acs-radio-pill input:checked + .acs-radio-indicator::after {
    transform: translate(-50%, -50%) scale(1);
}

.acs-radio-pill input:checked + .acs-radio-indicator + .acs-radio-text {
    color: #234a75;
}

.acs-radio-pill:has(input:checked),
.acs-radio-pill.acs-radio-checked {
    border-color: #2e5e94;
    background: #f1f6fd;
    box-shadow: 0 0 0 3px rgba(46, 94, 148, 0.12);
}

.acs-field-wrapper input[type="datetime-local"] {
    max-width: 480px !important;
    min-height: 58px;
    border-radius: 16px;
    font-size: 15px;
    color: #2b3441;
    border: 1px solid #c8d2e2;
    padding: 0 16px;
}

.acs-inline-notices {
    margin: 0;
}

.acs-inline-notices:empty {
    display: none;
}

.acs-inline-notice {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.acs-inline-notice-success {
    background: #ecfdf4;
    border-color: #7dd3a7;
    color: #0f6b3f;
}

.acs-inline-notice-error {
    background: #fef2f2;
    border-color: #f3a6a6;
    color: #b42318;
}

.acs-save-bar {
    position: sticky;
    bottom: 12px;
    z-index: 50;
    padding: 8px 0 0;
    margin-top: 10px;
    justify-content: flex-end;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.acs-save-changes {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px !important;
    padding: 0 28px !important;
    border-radius: 14px !important;
    border: 1px solid #163b63 !important;
    background: #1e3a5f !important;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 16px rgba(31, 110, 172, 0.28);
}

.acs-save-changes:hover {
    background: #2d5a87 !important;
    box-shadow: 0 12px 18px rgba(30, 58, 95, 0.35);
    transform: translateY(-1px);
}

.acs-save-changes:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.acs-save-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    display: none;
}

.acs-save-changes.acs-is-saving .acs-save-spinner {
    display: inline-block;
    animation: acs-spin 0.9s linear infinite;
}

@keyframes acs-spin {
    to {
        transform: rotate(360deg);
    }
}

.acs-upgrade-box {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(144, 177, 226, 0.45);
    background: linear-gradient(145deg, #0f223b 0%, #1e3f66 55%, #29507e 100%);
    padding: 22px;
    box-shadow: 0 14px 30px rgba(15, 34, 59, 0.35);
}

.acs-upgrade-box::after {
    content: "";
    position: absolute;
    inset: auto -40px -80px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 68%);
}

.acs-upgrade-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 24px;
    border-radius: 999px;
    background: #f5b400;
    color: #111827;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.acs-pro-active-pill {
    min-width: 96px;
    background: #22c55e;
    color: #052e16;
}

.acs-upgrade-box h3 {
    margin-top: 12px;
    margin-bottom: 10px;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.acs-upgrade-box p {
    color: rgba(242, 247, 255, 0.92);
    margin-bottom: 14px;
}

.acs-redirect-url-field {
    margin-top: 16px;
}

.acs-redirect-url-field .acs-field-wrapper {
    margin-bottom: 0;
}

.acs-redirect-url-field .acs-field-wrapper input[type="url"] {
    max-width: 100% !important;
    width: 100%;
}

.acs-upgrade-features {
    margin-bottom: 18px;
    text-align: left;
}

.acs-upgrade-features li {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 13px;
    text-align: left;
}

.acs-upgrade-features .acs-feature-label {
    grid-column: 2;
}

.acs-upgrade-features .acs-badge {
    grid-column: 3;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.acs-upgrade-features li::before {
    grid-column: 1;
    justify-self: start;
    color: #6ee7b7;
}

.acs-upgrade-btn {
    border: 1px solid rgba(214, 228, 250, 0.7) !important;
    background: #ffffff !important;
    color: #16345a !important;
    font-weight: 700 !important;
}

.acs-upgrade-btn:hover {
    background: #f1f6fd !important;
    transform: translateY(-1px);
}

@media screen and (max-width: 960px) {
    .acs-mode-option .acs-mode-card {
        min-height: auto;
    }

    .acs-mode-option .acs-mode-card strong {
        font-size: 17px;
    }

    .acs-mode-option .acs-mode-card span {
        font-size: 14px;
    }

    .acs-save-changes {
        width: 100%;
    }

    .acs-radio-pill .acs-radio-text {
        font-size: 15px;
    }
}

/* ==========================================
   Button Styling Refresh
   ========================================== */
.acs-settings-box .button:not(.acs-save-changes):not(.acs-template-preview-btn):not(.button-link):not(.wp-switch-editor):not(.wp-color-result):not(.wp-picker-clear) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px !important;
    border-radius: 10px !important;
    border: 1px solid #1e3a5f !important;
    background: #ffffff !important;
    color: #1e3a5f !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.1);
}

.acs-settings-box .button:not(.acs-save-changes):not(.acs-template-preview-btn):not(.button-link):not(.wp-switch-editor):not(.wp-color-result):not(.wp-picker-clear):hover {
    border-color: #2d5a87 !important;
    background: #eff5fc !important;
    color: #1e3a5f !important;
}

.acs-sidebar-widget .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 0 16px !important;
    border-radius: 12px !important;
    border: 1px solid #1e3a5f !important;
    background: linear-gradient(180deg, #1e3a5f 0%, #163150 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(22, 49, 80, 0.2);
}

.acs-sidebar-widget .button:hover {
    background: linear-gradient(180deg, #2d5a87 0%, #1f466d 100%) !important;
    border-color: #2d5a87 !important;
    color: #ffffff !important;
}

/* Stabilize template card selection state to prevent border flicker */
.acs-theme-item {
    border: 1px solid #d5dce7 !important;
    transition: box-shadow 0.18s ease, border-color 0.18s ease !important;
    transform: none !important;
}

.acs-theme-item:hover {
    border-color: #b7c4d8 !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
    transform: none !important;
}

.acs-theme-item.acs-active {
    border-color: #1e3a5f !important;
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.18), 0 8px 22px rgba(15, 23, 42, 0.1) !important;
}

.acs-theme-item.acs-active:hover {
    transform: none !important;
}


/* Final anti-flicker guard for template cards */
.acs-theme-item,
.acs-theme-item::before,
.acs-theme-item::after,
.acs-theme-item *,
.acs-theme-item *::before,
.acs-theme-item *::after {
    transition: none !important;
    animation: none !important;
}

.acs-theme-item {
    border-width: 1px !important;
    will-change: auto !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.acs-theme-item:hover,
.acs-theme-item.acs-active,
.acs-theme-item.acs-active:hover {
    transform: none !important;
}


/* Template badges and in-section notices */
.acs-free-label {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.96);
    color: #1e3a5f;
    border: 1px solid #b9cae4;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

.acs-template-notices {
    margin: 0 0 14px;
}

.acs-template-notices .acs-inline-notice {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.acs-template-notices .acs-inline-notice-success {
    background: #eef4ff;
    border-color: #b8cef5;
    color: #1e3a5f;
}

.acs-template-notices .acs-inline-notice-error {
    background: #fef2f2;
    border-color: #f3a6a6;
    color: #b42318;
}


/* Notification polish */
.acs-notification {
    top: 68px;
    right: 24px;
    min-width: 320px;
    max-width: 460px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(6px);
}

.acs-notification-success {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

.acs-notification-error {
    background: linear-gradient(135deg, #b42318 0%, #dc2626 100%);
}


/* Keep save button stable while saving (no jump). */
.acs-save-changes {
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.acs-save-spinner {
    display: inline-block;
    opacity: 0;
    visibility: hidden;
    flex: 0 0 16px;
}

.acs-save-changes.acs-is-saving,
.acs-save-changes.acs-is-saving:hover {
    transform: none !important;
}

.acs-save-changes.acs-is-saving .acs-save-spinner {
    opacity: 1;
    visibility: visible;
}


/* Keep save label perfectly centered while spinner sits on the right */
.acs-save-changes {
    position: relative;
    gap: 0 !important;
}

.acs-save-changes .acs-save-label {
    display: inline-block;
    width: 100%;
    text-align: center;
}

.acs-save-changes .acs-save-spinner {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.acs-save-changes.acs-is-saving .acs-save-spinner {
    transform: translateY(-50%);
    animation: acs-spin 0.9s linear infinite;
}

/* Keep template names and descriptions on a single line. */
.acs-theme-name,
.acs-theme-desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.acs-saved-palettes-empty {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.acs-saved-palette-entry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 18px;
    border-color: #2b4f7f;
    color: #415a77;
}

.acs-saved-palette-entry .acs-saved-palette-name {
    font-weight: 600;
}


.acs-palette-saved-title {
    margin: 12px 0 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.acs-saved-palettes-list {
    margin-top: 0;
    margin-bottom: 12px;
}


/* Force palette name input to match ACS field/select styling exactly. */
.acs-settings-fields-box .acs-palette-pro-create input.acs-palette-name-input {
    width: 100% !important;
    max-width: 520px !important;
    min-height: 42px !important;
    border: 1px solid #d1d9e6 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #0f172a !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
    box-shadow: none !important;
}

.acs-settings-fields-box .acs-palette-pro-create input.acs-palette-name-input::placeholder {
    color: #64748b !important;
}

.acs-settings-fields-box .acs-palette-pro-create input.acs-palette-name-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    outline: none !important;
}
