/**
 * Admin Styles - Modern UI
 *
 * @package Spin_Wheel
 */

/* linear-gradient(35deg, #f24101, #f7994c) */



/* ==========================================================================
   Modern Form Elements
   ========================================================================== */

.swp-settings-section {
    margin-bottom: 20px;
}

.swp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.swp-section-title,
.swp-card-header h3 {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 0 20px !important;
    padding: 0 0 12px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1d2327;
    position: relative;
    border-bottom: 1px solid #ececec;
}

.swp-section-title:before,
.swp-card-header h3:before {
    position: absolute;
    content: '';
    width: 50px;
    height: 2px;
    background: linear-gradient(35deg, #f24101, #f7994c);
    bottom: -1px;
}

#swp_modern_editor .button-secondary,
#swp_modern_editor .button-primary {
    vertical-align: middle;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 10px 12px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#swp_modern_editor .button-secondary {
    color: #222527;
    border-color: #dcdcdc;
    background: #efefef;
}

#swp_modern_editor .button-secondary:hover {
    color: #000;
    background: #e0e0e0;
}

#swp_modern_editor .button-primary {
    background: linear-gradient(35deg, #f24101, #f7994c);
    border: 0;
    color: #fff;
}

#swp_modern_editor .button-primary:hover {
    background: linear-gradient(35deg, #f7994c, #f24101);
}

#swp_modern_editor .button-primary:focus {
    box-shadow: 0 0 0 1px #fff, 0 0 0 3px #f24101;
}



/* Form Rows */
.swp-form-row {
    margin-bottom: 20px;
}

.swp-form-row:last-child {
    margin-bottom: 0;
}

.swp-field-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.swp-field-row {
    margin-bottom: 0 !important;
}

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

/* Editor rows: label + ? tooltip + PRO badge on one line (see Maximum Participants) */
.swp-form-row > .swp-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.swp-form-row > .swp-label .swp-tooltip-wrapper {
    margin-left: 0;
}

.swp-form-row > .swp-label .swp-label-text {
    line-height: 1.4;
}

/* Global settings page: form-table row labels (tooltip + PRO) */
.swp-settings-form .form-table th[scope="row"] {
    vertical-align: top;
}

.swp-settings-form .form-table th[scope="row"] .swp-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 0;
    font-weight: 600;
    line-height: 1.4;
}

.swp-settings-form .form-table th[scope="row"] .swp-label .swp-tooltip-wrapper {
    margin-left: 0;
}

.swp-required {
    color: #d63638;
}

.swp-input,
.swp-select,
.swp-textarea,
.swp-settings-form select,
.swp-settings-form input,
.swp-settings-wrap textarea,
#swp-search-query {
    width: 100%;
    padding: 10px 12px !important;
    border: 1px solid #e7e7e7 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    transition: border-color 0.2s !important;
}

/* No focus ring on fields (overrides WP core + :focus-visible) */
.swp-input:focus,
.swp-input:focus-visible,
.swp-select:focus,
.swp-select:focus-visible,
.swp-textarea:focus,
.swp-textarea:focus-visible,
.swp-settings-form select:focus,
.swp-settings-form select:focus-visible,
.swp-settings-form input:focus,
.swp-settings-form input:focus-visible,
.swp-settings-wrap textarea:focus,
.swp-settings-wrap textarea:focus-visible,
#swp-search-query:focus,
#swp-search-query:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: #e7e7e7 !important;
}

/* Wheel editor metabox: beat WP forms.css focus styles */
#swp_modern_editor input:not([type="hidden"]):focus,
#swp_modern_editor input:not([type="hidden"]):focus-visible,
#swp_modern_editor textarea:focus,
#swp_modern_editor textarea:focus-visible,
#swp_modern_editor select:focus,
#swp_modern_editor select:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: #e7e7e7 !important;
}

.swp-select:hover,
.swp-settings-form select:hover {
    color: currentColor !important;
}

.swp-settings-wrap input[type=number].small-text {
    width: 75px;
}

.swp-hint {
    margin: 6px 0 0;
    font-size: 13px;
    color: #646970;
    font-style: italic;
}

.swp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 12px;
}

.swp-checkbox-label:last-child {
    margin-bottom: 0;
}

.swp-checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* Input with Slider */
.swp-input-with-slider {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.swp-range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #d1d5db;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.swp-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2271b1;
    cursor: pointer;
}

.swp-range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2271b1;
    cursor: pointer;
    border: none;
}

/* Info Box */
.swp-info-box {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: #e7f5fe;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    margin-bottom: 20px;
}

.swp-info-box .dashicons {
    color: #2271b1;
    flex-shrink: 0;
    margin-top: 2px;
}

.swp-info-box strong {
    display: block;
    margin-bottom: 4px;
    color: #1d2327;
}

.swp-info-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #1d2327;
}

.swp-mb-20 {
    margin-bottom: 20px !important;
}

/* ==========================================================================
   Inline Prize List
   ========================================================================== */

.swp-probability-total {
    padding: 14px 20px;
    background: #f0f0f1;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    white-space: nowrap;
    font-size: 16px;
}

.swp-probability-total strong {
    margin-right: 8px;
}

.swp-probability-total span {
    font-weight: 700;
    color: #2271b1;
    font-size: 18px;
}

.swp-prizes-list {
    border: 1px solid #ededed;
    border-radius: 6px;
    overflow: hidden;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}

.swp-prize-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #ededed;
    transition: background 0.2s;
}

.swp-prize-row:last-child {
    border-bottom: none;
}

.swp-prize-row:hover {
    background: #f6f7f7;
}

.swp-prize-row.ui-sortable-helper {
    box-shadow: none;
    border: none;
    pointer-events: none;
}

.swp-prize-drag {
    display: none !important;
    color: #8c8f94;
    cursor: default;
    padding: 8px 4px;
    user-select: none;
    pointer-events: none;
}

.swp-prize-drag:hover {
    color: #8c8f94;
}

.swp-prize-fields-inline {
    flex: 1;
    display: flex;
    /* grid-template-columns: repeat(12, 1fr); */
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.swp-prize-fields-inline .swp-prize-field {
    grid-column: span 3;
}

@media (min-width: 1024px) {
    .swp-prize-fields-inline .swp-prize-field {
        grid-column: span 4;
    }
}

@media (min-width: 1440px) {
    .swp-prize-fields-inline .swp-prize-field {
        grid-column: span 3;
    }
}

@media (min-width: 1540px) {
    .swp-prize-fields-inline .swp-prize-field {
        grid-column: span 2;
    }
}



.swp-prize-field {
    display: flex;
    flex-direction: column;
}

.swp-prize-field-probability {
    min-width: 100px;
}

.swp-prize-field.swp-prize-field-image {
    min-width: 80px;
}

.swp-prize-field .wp-color-result-text {
    padding: 3px 6px;
}

.swp-prize-field label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1d2327;
    display: block;
}

.swp-prize-field .swp-input,
.swp-prize-field .swp-color-picker {
    width: 100%;
}

/* Prize field winning toggle specific styles */
.swp-prize-field-winning .swp-toggle-label {
    margin-top: 6px;
    justify-content: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swp-prize-field-winning .swp-toggle-text {
    color: #1d2327;
    font-size: 13px;
}


.swp-prize-actions {
    padding-top: 22px;
}

.swp-remove-prize {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
    color: #d63638;
}

.swp-remove-prize:hover {
    background: #fcf0f1;
}

/* Sortable placeholder */
.swp-prize-placeholder {
    background: #f0f6fc;
    border: 2px dashed #2271b1;
    visibility: visible !important;
    height: 60px;
}


@media screen and (max-width: 768px) {

    .swp-prize-drag,
    .swp-prize-actions {
        padding-top: 0;
    }
}

/* Color Picker */
.swp-color-picker {
    max-width: 150px;
}

/* Prize Image Upload */
.swp-image-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swp-image-preview-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}

.swp-prize-image {
    width: 100%;
    max-height: 40px;
    border: 2px solid #ddd;
    border-radius: 6px;
    display: block;
    object-fit: cover;
}

.swp-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: #d63638;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.swp-remove-image:hover {
    background: #b32d2e;
    transform: scale(1.1);
}

.swp-remove-image .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.swp-upload-image {
    min-width: 100%;
    height: 42px;
    padding: 4px !important;
    border: 1px dashed #ddd !important;
    position: relative;
}

.swp-upload-image .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Modern Image Upload Area (Settings) */
.swp-image-upload-area {
    position: relative;
    min-height: 100px;
    border: 2px dashed #c3c4c7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    background: #f9f9f9;
}

.swp-image-upload-area:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

/* Upload Placeholder */
.swp-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: #646970;
    transition: all 0.3s ease;
}

.swp-image-upload-area:hover .swp-upload-placeholder {
    color: #2271b1;
}

.swp-upload-placeholder .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.swp-upload-placeholder p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

/* Image Preview Container */
.swp-image-preview-container {
    position: relative;
    width: 100%;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.swp-preview-image {
    max-width: 100%;
    max-height: 100px;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Remove Icon (overlay on image) */
.swp-remove-image-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 2px solid #fff;
    background: #d63638;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0;
}

.swp-image-preview-container:hover .swp-remove-image-icon {
    opacity: 1;
}

.swp-remove-image-icon:hover {
    background: #b32d2e;
    transform: scale(1.1);
}

.swp-remove-image-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

/* Click hint overlay */
.swp-image-preview-container::after {
    content: 'Click to change';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.swp-image-preview-container:hover::after {
    opacity: 1;
}

/* ==========================================================================
   Display Rules Grid
   ========================================================================== */

.swp-display-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.swp-display-rules-grid .swp-card:first-child {
    border-right: 1px solid #ececec;
    padding-right: 20px;
}

@media screen and (max-width: 1200px) {
    .swp-display-rules-grid {
        grid-template-columns: 1fr;
    }
}

.swp-card-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Device Toggles */
.swp-device-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.swp-toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.swp-toggle-input {
    position: absolute;
    opacity: 0 !important;
    pointer-events: none;
}

.swp-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    transition: background 0.3s;
}

.swp-toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.swp-toggle-input:checked+.swp-toggle-switch {
    background: linear-gradient(35deg, #f24101, #f7994c);
}

.swp-toggle-input:checked+.swp-toggle-switch::after {
    transform: translateX(20px);
}

.swp-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
}

/* Input Groups */
.swp-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swp-input-addon {
    padding: 8px 12px;
    background: #f0f0f1;
    border: 1px solid #dadada;
    border-radius: 4px;
    font-size: 13px;
    color: #4f545a;
    white-space: nowrap;
    line-height: 1.5;
}

/* Date Range */
.swp-date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.swp-date-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.swp-sub-label {
    font-size: 12px;
    font-weight: 600;
    color: #646970;
}

.swp-time-display {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #646970;
    font-style: italic;
}

/* Pro Badge */
.swp-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
}

.swp-badge-pro {
    background: #f0b429;
    color: #fff;
}

.swp-badge-success {
    background: #46b450;
    color: #fff;
}

/* Multiple Select Enhancement */
select[multiple].swp-select {
    min-height: 100px;
    padding: 8px;
}

select[multiple].swp-select option {
    padding: 6px 8px;
    border-radius: 3px;
    margin-bottom: 2px;
}

select[multiple].swp-select option:checked {
    background: linear-gradient(0deg, #2271b1 0%, #2271b1 100%);
    color: #fff;
}

/* ==========================================================================
   Advanced Conditions Repeater
   ========================================================================== */

.swp-conditions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.swp-condition-row {
    display: flex;
    align-items: center;
    /* gap: 10px; */
    padding: 10px;
    background: #f6f7f7;
    border: 1px solid #ebe7e7;
    border-radius: 6px;
}

.swp-condition-row .swp-select {
    font-size: 12px !important;
}

.swp-condition-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    gap: 10px;
    align-items: center;
}

.swp-remove-condition {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
    color: #d63638;
    flex-shrink: 0;
}

.swp-remove-condition:hover {
    color: #f00;
}

/* Empty state */
.swp-conditions-list:empty::before {
    content: 'No conditions added yet. Click "Add Condition" to create one.';
    display: block;
    padding: 20px;
    text-align: center;
    color: #646970;
    font-style: italic;
    background: #f6f7f7;
    border-radius: 4px;
}

/* Color Picker */
.swp-color-picker {
    max-width: 150px;
}

/* ==========================================================================
   Email Preview
   ========================================================================== */

.swp-email-preview {
    border: 1px solid #ededed;
    border-radius: 6px;
    overflow: hidden;
}

.swp-email-header h3 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #ededed;
    background: linear-gradient(35deg, #f7994c, #f24101);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.swp-email-body {
    padding: 30px;
    background: #f9f9f9;
    text-align: center;
}

.swp-email-body p {
    margin: 0 0 15px;
    line-height: 1.6;
}

.swp-email-prize-box {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    max-width: 450px;
    margin: auto;
}

.swp-email-prize-box h4 {
    margin: 0 0 10px;
    color: #f24101;
}

.swp-email-prize-box .swp-prize-label {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 10px 0;
}

.swp-email-prize-box .swp-coupon-code {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    margin: 0;
    font-family: 'Courier New', monospace;
}

/* ==========================================================================
   Usage sidebar ( #swp_wheel_shortcode )
   ========================================================================== */

#swp_wheel_shortcode .inside {
    margin: 0;
    padding: 0;
}

.swp-usage-metabox {
    padding: 12px 14px 14px;
}

.swp-usage-metabox__field {
    margin-bottom: 14px;
}

.swp-usage-metabox__label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #1d2327;
}

.swp-usage-metabox__select {
    max-width: 100%;
    font-size: 14px !important;
    line-height: 1.5 !important;
    min-height: 36px;
}

.swp-usage-metabox__panel {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #dcdcde;
}

.swp-usage-metabox__panel[hidden] {
    display: none !important;
}

.swp-usage-metabox__panel--embed {
    background: #f6f7f7;
    margin: 0 -14px -14px;
    padding: 12px 14px 14px;
    border-top: 1px solid #dcdcde;
    border-radius: 0 0 2px 2px;
}

.swp-usage-metabox__lead {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #2c3338;
}

.swp-usage-metabox__list {
    margin: 0 0 10px 1.1em;
    padding: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #50575e;
}

.swp-usage-metabox__list li {
    margin-bottom: 6px;
}

.swp-usage-metabox__list li:last-child {
    margin-bottom: 0;
}

.swp-usage-metabox__note {
    margin: 0;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.swp-usage-metabox__notice {
    margin: 10px 0 0;
    padding: 8px 10px;
    background: #fcf9e8;
    border: 1px solid #dba617;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.45;
    color: #1d2327;
}

.swp-shortcode-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 10px;
}

.swp-shortcode-input {
    flex: 1;
    min-width: 0;
    font-family: 'Courier New', Courier, monospace;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px !important;
}

.swp-shortcode-input:focus {
    background: #fff;
    border-color: #8c8f94;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.swp-copy-shortcode {
    flex-shrink: 0;
}

/* Entries Page */
/* .swp-entries-filter {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.swp-entries-filter form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
} */

#swp-wheel-select {
    min-width: 300px;
}

.swp-entries-stats {
    background: #f0f0f1;
    border-left: 4px solid #2271b1;
    padding: 12px;
    margin: 20px 0;
}

.swp-entries-stats p {
    margin: 5px 0;
}

/* Badges */
.swp-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #ddd;
    color: #333;
    border-radius: 3px;
    white-space: nowrap;
}

.swp-badge-success {
    background: #46b450;
    color: #fff;
}

.swp-badge-info {
    background: #00a0d2;
    color: #fff;
}

.swp-badge-warning {
    background: #f0b849;
    color: #333;
}

.swp-badge-error {
    background: #dc3232;
    color: #fff;
}

/* Post Type Columns */
.column-wheel_type,
.column-entries {
    width: 120px;
}

.column-shortcode {
    width: 250px;
}

.swp-shortcode-column {
    display: flex;
    align-items: center;
    gap: 8px;
}

.swp-shortcode-text {
    font-size: 11px;
    background: #f0f0f1;
    padding: 3px 6px;
    border-radius: 3px;
    flex: 1;
    min-width: 0;
}

.swp-copy-btn {
    padding: 2px 6px !important;
    height: 24px !important;
    min-height: 24px !important;
    line-height: 1 !important;
    flex-shrink: 0;
    cursor: pointer;
}

.swp-copy-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

.swp-copy-btn:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.swp-copy-btn.copied {
    background: #00a32a;
    border-color: #00a32a;
    color: #fff;
}

/* Legacy support */
.column-shortcode code {
    font-size: 11px;
    background: #f0f0f1;
    padding: 3px 6px;
    border-radius: 3px;
}

/* Loading Spinner */
.swp-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: swp-spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes swp-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 782px) {
    .swp-entries-filter form {
        flex-direction: column;
        align-items: stretch;
    }

    #swp-wheel-select {
        width: 100%;
        min-width: 0;
    }

    .swp-shortcode-box {
        flex-direction: column;
        align-items: stretch;
    }
}


/* wheel configuration page css start here */

.swp-modern-editor {
    margin: 20px 0;
}

.swp-editor-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    flex-direction: column;
}

@media (min-width: 1920px) {
    .swp-editor-container {
        flex-direction: row;
    }
}

.swp-editor-left {
    flex: 1;
    background: #fff;
    /* width: 60%; */
}

/* .swp-editor-right {
    width: 500px;
    position: sticky;
    top: 32px;
    align-self: flex-start;
} */

.swp-tabs-nav {
    display: flex;
}

.swp-tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: 0;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #3d3f43;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
    border-bottom: 2px solid #eaeaea;
}

.swp-tab-btn:hover {
    color: #f24101;
}

.swp-tab-btn.active {
    color: #f24101;
    border-color: #f24101;
}

.swp-tab-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: block;
}

.swp-tabs-content {
    padding: 20px;
}

.swp-tab-content {
    display: none;
}

.swp-tab-content.active {
    display: block;
}

.swp-preview-panel {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    overflow: hidden;
}

.swp-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #c3c4c7;
}

.swp-preview-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swp-preview-content {
    padding: 20px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f1;
}

.swp-preview-loading {
    text-align: center;
}

.swp-preview-info {
    padding: 15px 20px;
    background: #f6f7f7;
    border-top: 1px solid #c3c4c7;
}

.swp-preview-info .description {
    margin: 0;
    font-size: 13px;
}

/* ==========================================================================
   Preview Offcanvas Sidebar
   ========================================================================== */

.swp-preview-toggle {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(35deg, #f24101, #f7994c);
    color: #fff;
    border: none;
    border-radius: 6px 0 0 6px;
    padding: 15px 12px;
    cursor: pointer;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.swp-preview-toggle:hover {
    background: linear-gradient(35deg, #f7994c, #f24101);
    padding-right: 15px;
}

.swp-preview-toggle .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.swp-preview-toggle .swp-toggle-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
}

.swp-refresh-preview {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #e7eaf3 !important;
    background: #ddd !important;
    gap: 6px;
    border-radius: 6px !important;
    color: #000 !important;
}

.swp-preview-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.swp-preview-offcanvas.active {
    /* Remove pointer-events: auto to allow background page interaction */
}

.swp-preview-offcanvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

.swp-preview-offcanvas.active .swp-preview-offcanvas-overlay {
    opacity: 0;
    display: none;
}

.swp-preview-offcanvas-panel {
    position: absolute;
    top: 32px;
    bottom: 0;
    right: 0;
    min-width: 500px;
    max-width: 90%;
    /* height: 100%; */
    background: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: auto;
}

/* Flattened — nested blocks break parsers without CSS Nesting support and can invalidate the panel rule */
.swp-preview-offcanvas-panel #swp-admin-preview-canvas {
    transform: scale(0.9);
    transform-origin: top center;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: auto;
}

.swp-preview-offcanvas-panel .swp-admin-grid-external-spin {
    --swp-external-spin-mid: #e45912;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    margin: 12px auto 0;
    padding: 0 22px;
    min-height: 38px;
    box-sizing: border-box;
    appearance: none;
    border: 1px solid rgba(120, 42, 12, 0.42);
    border-radius: 4px;
    cursor: default;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    color: #fff !important;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.18);
    background: linear-gradient(90deg, #b91c1c 0%, var(--swp-external-spin-mid) 44%, #f6ad3a 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 1px 0 rgba(200, 85, 30, 0.35),
        0 2px 4px rgba(0, 0, 0, 0.11),
        0 4px 10px rgba(190, 75, 25, 0.18);
}


.swp-preview-offcanvas.active .swp-preview-offcanvas-panel {
    transform: translateX(0);
}

.swp-preview-offcanvas .swp-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #c3c4c7;
    flex-shrink: 0;
}

.swp-preview-offcanvas .swp-preview-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swp-preview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.swp-preview-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #50575e;
    transition: color 0.2s ease;
}

.swp-preview-close:hover {
    color: #d63638;
}

.swp-preview-close .dashicons {
    width: 26px;
    height: 26px;
    font-size: 26px;
}

.swp-preview-offcanvas .swp-preview-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 0;
    background: #f0f0f1;
}

.swp-preview-offcanvas .swp-preview-info {
    padding: 15px 20px;
    background: #f6f7f7;
    border-top: 1px solid #c3c4c7;
    flex-shrink: 0;
}

.swp-preview-offcanvas .swp-preview-info .description {
    margin: 0;
    font-size: 13px;
}

/* Hide toggle button when offcanvas is active */
.swp-preview-offcanvas.active~.swp-preview-toggle {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 782px) {
    .swp-preview-offcanvas-panel {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 1280px) {
    .swp-editor-container {
        flex-direction: column;
    }

    .swp-editor-right {
        width: 100%;
        position: relative;
        top: 0;
    }
}

@media (max-width: 782px) {
    .swp-tabs-nav {
        flex-wrap: wrap;
    }

    .swp-tab-btn {
        flex: 1 1 50%;
    }
}

/* wheel configuration page css end here */

/* ==========================================================================
   Accordion Styles
   ========================================================================== */

.swp-accordion-container {
    margin-top: 20px;
}

.swp-accordion-item {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 6px;
    margin-bottom: 12px;
}

.swp-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    cursor: pointer;
    user-select: none;
}

.swp-accordion-header:hover {
    background: #f0f0f0;
}

.swp-accordion-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 10px;
}

.swp-accordion-header h3 .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #f24101;
}

.swp-accordion-icon {
    transition: transform 0.3s ease;
}

.swp-accordion-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #646970;
}

.swp-accordion-item.active .swp-accordion-icon {
    transform: rotate(180deg);
}

.swp-accordion-item.active .swp-accordion-header {
    background: #f0f0f0;
}

.swp-accordion-body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.swp-accordion-item.active .swp-accordion-body {
    max-height: 3000px;
    padding: 20px;
    opacity: 1;
}

/* First accordion initially open but user can close it - handled by JavaScript */

/* Improved Inline Slider Controls */
.swp-input-with-slider-inline {
    display: flex;
    align-items: center;
    gap: 15px;
}

.swp-input-with-slider-inline .swp-input {
    width: 100px;
    flex-shrink: 0;
}

.swp-input-with-slider-inline .swp-range-slider {
    flex: 1;
    /* min-width: 200px; */
    height: 6px;
    border-radius: 3px;
    background: #dcdcde;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.swp-input-with-slider-inline .swp-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f24101;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.swp-input-with-slider-inline .swp-range-slider::-webkit-slider-thumb:hover {
    background: #d63638;
    transform: scale(1.1);
}

.swp-input-with-slider-inline .swp-range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f24101;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.swp-input-with-slider-inline .swp-range-slider::-moz-range-thumb:hover {
    background: #d63638;
    transform: scale(1.1);
}

.swp-input-with-slider-inline .swp-slider-value {
    min-width: 60px;
    font-weight: 600;
    color: #f24101;
    text-align: right;
    font-size: 14px;
}

/* General Settings Tab */
.swp-participant-status {
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.swp-status-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.swp-current-count {
    font-weight: 600;
    color: #1d2327;
}

.swp-limit-info {
    color: #646970;
    font-size: 13px;
}

.swp-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.swp-status-full {
    background: #f0b7b8;
    color: #d63638;
    border: 1px solid #f0b7b8;
}

.swp-status-available {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #d1e7dd;
}

@media (max-width: 768px) {
    .swp-status-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Form tab — modern cards, field blocks, disclosure panels */
#tab-form .swp-form-tab > .swp-section-title {
    font-size: 20px;
    letter-spacing: -0.02em;
    margin-bottom: 28px !important;
}

#tab-form .swp-card--elevated {
    background: #fff;
    padding: 0;
    margin-bottom: 24px;
    border-radius: 10px;
    border: 1px solid #dcdcde;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

#tab-form .swp-card--elevated .swp-card-header {
    margin: 0;
    padding: 18px 22px 16px;
    background: linear-gradient(180deg, #fafbfc 0%, #f0f0f1 100%);
    border-bottom: 1px solid #dcdcde;
}

#tab-form .swp-card--elevated .swp-card-header h3 {
    margin: 0 0 6px !important;
    padding: 0 !important;
    border: none !important;
    font-size: 16px !important;
    line-height: 1.35;
}

#tab-form .swp-card--elevated .swp-card-header h3:before {
    display: none;
}

#tab-form .swp-card-intro {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    color: #646970;
    max-width: 42rem;
}

#tab-form .swp-card--elevated .swp-card-body {
    padding: 20px 22px 22px;
    background: #fff;
}

#tab-form .swp-form-field-block {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 14px;
    background: #fafafa;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#tab-form .swp-form-field-block:last-child {
    margin-bottom: 0;
}

/* Avoid “halo” around whole block when an inner input is focused */
#tab-form .swp-form-field-block:focus-within {
    border-color: #e0e0e0;
    box-shadow: none;
}

#tab-form .swp-form-field-block--static:last-child {
    margin-bottom: 0;
}

#tab-form .swp-form-field-block--muted {
    background: #f4f4f5;
}

#tab-form .swp-form-field-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #646970;
    line-height: 1.45;
    max-width: 42rem;
}

#tab-form .swp-form-toggle-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.45;
    color: #1d2327;
    cursor: pointer;
    margin: 0;
}

#tab-form .swp-form-toggle-label:focus-within {
    outline: none;
    box-shadow: none;
}

#tab-form .swp-form-toggle-label input[type='checkbox'] {
    margin-top: 2px;
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

#tab-form .swp-form-toggle-label--disabled {
    cursor: not-allowed;
    color: #646970;
}

#tab-form .swp-form-field-help {
    margin: 8px 0 0 1.75rem;
    font-size: 13px;
    line-height: 1.5;
    color: #646970;
    max-width: 42rem;
}

#tab-form .swp-form-dependent {
    margin-top: 14px;
    padding: 14px 16px 16px;
    border-left: 3px solid #f24101;
    border-radius: 0 8px 8px 0;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.03);
}

/* Form tab: keep label + ? + PRO badge spaced (rows outside .swp-form-row lack flex gap otherwise) */
#tab-form .swp-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

#tab-form .swp-label .swp-tooltip-wrapper {
    margin-left: 0;
}

#tab-form .swp-form-dependent .swp-label {
    margin-top: 0;
}

#tab-form .swp-form-dependent[hidden] {
    display: none !important;
}

#tab-form .swp-form-sub-toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-weight: 500;
    font-size: 13px;
    color: #2c3338;
}

#tab-form .swp-form-sub-toggle input[type='checkbox'] {
    margin-top: 2px;
    flex-shrink: 0;
}

#tab-form .swp-otp-settings-wrap {
    margin-top: 4px;
}

#tab-form .swp-otp-settings-wrap[hidden] {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    #tab-form .swp-form-field-block {
        transition: none;
    }
}

/* Legacy: plain Form card without elevated class (if any) */
#tab-form .swp-card:not(.swp-card--elevated) {
    background: #f6f6f6;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #edeeef;
}

/* ==========================================================================
   Pagination Styles
   ========================================================================== */

#swp-pagination-bottom .swp-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 0;
    flex-wrap: wrap;
    gap: 15px;
}

.swp-pagination-info {
    color: #646970;
    font-size: 13px;
    font-weight: 500;
}

.swp-pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.swp-pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid #ededed;
    background: #fff;
    color: #50575e;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 14px;
    text-align: center;
    justify-content: center;
    cursor: pointer;
}

.swp-pagination-link:hover {
    background: #f24101;
    border-color: #f24101;
    color: #fff;
    text-decoration: none;
}

.swp-pagination-link:focus {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
    outline: none;
}

.swp-current-page {
    background: #f24101 !important;
    border-color: #f24101 !important;
    color: #fff !important;
    font-weight: 600;
    pointer-events: none;
}

.swp-pagination-dots {
    padding: 8px 4px;
    color: #646970;
    font-size: 13px;
}

.swp-prev-page,
.swp-next-page {
    font-weight: 500;
}

.swp-prev-page .dashicons,
.swp-next-page .dashicons {
    font-size: 16px;
    height: 16px;
    width: 16px;
}

.swp-per-page-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #646970;
    margin-left: auto;
}

.swp-per-page-selector label {
    font-weight: 500;
    margin: 0;
}

.swp-per-page-selector select {
    padding: 6px 8px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
}

.swp-per-page-selector select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.swp-loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 30px 40px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 200px;
}

.swp-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0 auto 15px;
    height: 60px;
}

.swp-circle {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    animation: swp-bounce 1.4s ease-in-out infinite;
}

.swp-circle-1 {
    animation-delay: 0s;
}

.swp-circle-2 {
    animation-delay: 0.2s;
}

.swp-circle-3 {
    animation-delay: 0.4s;
}

@keyframes swp-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.8) translateY(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2) translateY(-15px);
        opacity: 1;
    }
}

.swp-loading-spinner p {
    color: #646970;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}

/* Full page overlay when loading */
.swp-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.swp-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Position wrapper relatively for context */
.swp-entries-table-wrapper {
    position: relative;
}

.swp-entries-table-wrapper.swp-loading #swp-pagination-top,
.swp-entries-table-wrapper.swp-loading #swp-pagination-bottom {
    opacity: 0.3;
    pointer-events: none;
}

/* Responsive pagination */
@media screen and (max-width: 768px) {
    .swp-pagination-wrapper {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .swp-pagination-controls {
        justify-content: center;
    }

    .swp-pagination-link {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 28px;
    }

    .swp-prev-page span:not(.dashicons),
    .swp-next-page span:not(.dashicons) {
        display: none;
    }
}

/* <!-- Settings Page Styles --> */

/* Global overflow fix for settings page */
body.swp-settings-page {
    overflow-x: hidden;
}

body.swp-settings-page .swp-settings-wrap {
    max-width: 1200px;
    overflow-x: hidden;
    min-height: calc(100vh - 80px);
}

/* Fix table overflow issues */
.swp-settings-wrap .form-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

.swp-settings-wrap .form-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 0;
}

/* Fix input elements overflow */
.swp-settings-wrap input[type="text"],
.swp-settings-wrap input[type="email"],
.swp-settings-wrap input[type="number"],
.swp-settings-wrap select,
.swp-settings-wrap textarea {
    max-width: 100%;
    box-sizing: border-box;
}

.swp-settings-wrap {
    margin: 20px 20px 0 0;
    max-width: 100%;
    overflow-x: hidden;
}

.swp-settings-wrap .swp-settings-content-wrapper {
    display: flex;
    max-width: 100%;
    overflow-x: hidden;
}

.swp-settings-wrap .swp-settings-container {
    background: #fff;
    max-width: 100%;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

.swp-settings-wrap .swp-settings-header,
.swp-entries-page .swp-entries-header-wrap {
    background: linear-gradient(35deg, #f24101, #f7994c);
    padding: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.swp-settings-wrap h1,
.swp-entries-page h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 0;
    color: #fff;
    font-weight: 700;
    font-size: 26px;
    line-height: 1;
}

.swp-settings-wrap .swp-settings-head-icon,
.swp-entries-page .swp-entries-head-icon {
    background: #000;
    padding: 10px;
    display: block;
    border-radius: 6px;
}

.swp-settings-wrap .swp-settings-head-icon svg,
.swp-entries-page .swp-entries-head-icon svg {
    width: 32px;
    height: 32px;
    display: block;
}

.swp-settings-wrap .swp-header-description,
.swp-entries-page .swp-header-description {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.5;
    max-inline-size: 600px;
}

/* Tabs Navigation */
.swp-settings-wrap .swp-settings-tabs-nav-left {
    display: flex;
    background: #f8fafc;
    flex-direction: column;
    min-width: 280px;
    max-width: 280px;
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.swp-settings-wrap .swp-menu-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 30px;
    color: #000;
}

.swp-settings-wrap .swp-tab-button {
    background: transparent;
    border: none;
    color: #585e78;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-radius: 8px;
    margin: 0 20px 5px 20px;
}


.swp-settings-wrap .swp-tab-button:hover {
    background: #dde4f0;
    color: #1e293b;
}

.swp-settings-wrap .swp-tab-button.active {
    background: linear-gradient(35deg, #f24101, #f7994c);
    color: #ffffff;
}

.swp-settings-wrap .swp-tab-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Tab Content */

.swp-settings-wrap .swp-settings-form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.swp-settings-wrap .swp-tab-content {
    display: none;
    padding: 30px;
    min-height: 450px;
}

.swp-settings-wrap .swp-tab-content.active {
    display: block;
}

.swp-settings-wrap .swp-tab-content h2 {
    margin: 0 0 10px;
    color: #1d2327;
}

.swp-settings-wrap .swp-tab-content>.description {
    margin-bottom: 25px;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
    position: relative;
}

.swp-settings-wrap .swp-tab-content>.description::before {
    content: '';
    position: absolute;
    bottom: -1px;
    display: block;
    width: 80px;
    height: 2px;
    background: linear-gradient(35deg, #f24101, #f7994c);

}


/* Form Table Enhancements */
.swp-settings-wrap .swp-tab-content .form-table {
    margin-top: 20px;
}

.swp-settings-wrap .swp-tab-content .form-table th {
    font-weight: 600;
    color: #1d2327;
    padding: 15px 10px 15px 0;
    width: 280px;
    max-width: 280px;
    min-width: 200px;
}

.swp-settings-wrap .swp-tab-content .form-table td {
    padding: 15px 10px;
}

.swp-settings-wrap .swp-tab-content .form-table input[type="text"],
.swp-settings-wrap .swp-tab-content .form-table input[type="email"],
.swp-settings-wrap .swp-tab-content .form-table input[type="number"],
.swp-settings-wrap .swp-tab-content .form-table select,
.swp-settings-wrap .swp-tab-content .form-table textarea {
    border: 2px solid #dcdcde;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.swp-settings-wrap .swp-tab-content .form-table input[type="text"]:focus,
.swp-settings-wrap .swp-tab-content .form-table input[type="email"]:focus,
.swp-settings-wrap .swp-tab-content .form-table input[type="number"]:focus,
.swp-settings-wrap .swp-tab-content .form-table select:focus,
.swp-settings-wrap .swp-tab-content .form-table textarea:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 1px #667eea;
}

.swp-settings-wrap .swp-tab-content .form-table .description {
    margin-top: 8px;
    color: #646970;
    font-size: 13px;
}

.swp-settings-wrap .swp-tab-content .form-table textarea.code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #f6f7f7;
}

/* Color Picker */
.wp-picker-container .wp-color-result {
    border-radius: 4px;
}

/* Settings Footer */
.swp-settings-wrap .swp-settings-footer {
    position: sticky;
    bottom: 0;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 20px 30px;
    text-align: right;
}

.swp-settings-wrap .swp-settings-footer .button-hero {
    padding: 10px 16px !important;
    height: auto;
    line-height: 1.5 !important;
    font-size: 16px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(35deg, #f24101, #f7994c) !important;
    border: none;
    transition: all 0.3s ease;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 700;
}

.swp-settings-footer .button-hero:focus {
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px #f24101;
}

.swp-settings-wrap .swp-settings-footer .button-hero:hover {
    background: linear-gradient(35deg, #f7994c, #f24101) !important;
    transform: translateY(-2px);
}

.swp-settings-wrap .swp-settings-footer .button-hero .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .swp-settings-wrap .swp-settings-content-wrapper {
        flex-direction: column;
    }

    .swp-settings-wrap .swp-settings-tabs-nav-left {
        width: 100%;
        max-width: 100%;
        min-width: auto;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .swp-settings-wrap .swp-menu-title {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
        margin-bottom: 10px;
    }

    .swp-settings-wrap .swp-tab-button {
        flex: 1 1 auto;
        margin: 0 5px 5px 5px;
        justify-content: center;
    }
}

@media screen and (max-width: 782px) {
    .swp-settings-wrap .swp-tabs-nav {
        flex-wrap: wrap;
    }

    .swp-settings-wrap .swp-tab-button {
        flex: 1 1 auto;
        justify-content: center;
        padding: 12px 15px;
        font-size: 12px;
    }

    .swp-settings-wrap .swp-tab-content {
        padding: 20px 15px;
    }

    .swp-settings-wrap .swp-tab-content .form-table th {
        width: auto;
        padding: 10px 0;
    }

    .swp-settings-wrap .swp-settings-footer {
        text-align: center;
    }
}

/* ==========================================================================
   Preset Styles Section
   ========================================================================== */

.swp-preset-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swp-preset-header h3 .dashicons {
    color: #f24101;
}

.swp-preset-description {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 20px 0;
}

.swp-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.swp-preset-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.swp-preset-card.swp-preset-ring-grid,
.swp-preset-card.swp-preset-grid-2x3 {
    min-height: 0;
}

.swp-preset-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
    padding: 20px;
    position: relative;
    flex-shrink: 0;
}

.swp-preset-image {
    width: 100%;
    height: auto;
    transition: transform .3s ease;
}

.swp-preset-card:hover .swp-preset-image {
    animation: swpRotate 3s linear infinite;
}


@keyframes swpRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Preset thumbnails: on card hover, mimic a short SPIN interaction (grid chase, dial turn, CTA pulse). */
@keyframes swp-preset-mock-chase-cell {
    0% {
        filter: brightness(1.22) saturate(1.08);
        box-shadow:
            0 0 0 1px rgba(242, 74, 9, 0.28),
            0 2px 8px rgba(242, 74, 9, 0.18);
        transform: scale(1.03);
    }

    16% {
        filter: brightness(1) saturate(1);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
        transform: scale(1);
    }

    100% {
        filter: brightness(1) saturate(1);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
        transform: scale(1);
    }
}

@keyframes swp-preset-mock-circle-slot-chase {
    0% {
        filter: brightness(1.22) saturate(1.1);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.55),
            0 0 0 2px rgba(139, 158, 237, 0.5),
            0 2px 12px rgba(103, 65, 217, 0.32);
    }

    14% {
        filter: brightness(1) saturate(1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(60, 70, 120, 0.12);
    }

    100% {
        filter: brightness(1) saturate(1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(60, 70, 120, 0.12);
    }
}

@keyframes swp-preset-mock-ring-chase-cell {
    0% {
        filter: brightness(1.18) saturate(1.06);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.55),
            0 0 0 1px rgba(103, 65, 217, 0.35),
            0 2px 8px rgba(103, 65, 217, 0.2);
        transform: scale(1.04);
    }

    16% {
        filter: brightness(1) saturate(1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px rgba(80, 80, 120, 0.12);
        transform: scale(1);
    }

    100% {
        filter: brightness(1) saturate(1);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px rgba(80, 80, 120, 0.12);
        transform: scale(1);
    }
}


.swp-preset-info {
    padding: 15px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.swp-preset-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 6px 0;
}

.swp-preset-info p {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Default preset: thumbnail switches — big wheel image vs nine-square square grid mock */
.swp-preset-preview--default {
    background: #fff;
    min-height: 120px;
    padding: 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Nine-square mode: match Ring / External / Circle preset preview height (square stage). */
.swp-preset-preview--default.swp-preset-default-preview--grid {
    display: flex;
    flex-direction: column;
    min-height: 0;
    aspect-ratio: 1 / 1;
}

.swp-preset-preview--default.swp-preset-default-preview--grid .swp-preset-default-grid-stage {
    flex: 1 1 auto;
    min-height: 0;
    justify-content: center;
}

.swp-preset-default-thumb--big-wheel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
    min-height: 120px;
}

.swp-preset-default-thumb--big-wheel .swp-preset-image {
    width: 100%;
    height: auto;
}

.swp-preset-card.default:hover .swp-preset-default-thumb--big-wheel .swp-preset-image {
    animation: swpRotate 3s linear infinite;
}

.swp-preset-default-thumb--nine-squares {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    background: #f7994c;
    min-height: 110px;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
}

.swp-preset-preview--default.swp-preset-default-preview--grid .swp-preset-default-thumb--nine-squares {
    flex: 1 1 auto;
    min-height: 0;
}

.swp-preset-default-grid-stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 6px 5px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.swp-preset-default-grid-mock {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    gap: 2px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.swp-preset-default-grid-mock span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    font-size: 5px;
    font-weight: 700;
    color: transparent;
    line-height: 1;
}

.swp-preset-default-grid-mock span:not(.is-center):nth-child(even) {
    background: #ffd7b7;
}

.swp-preset-default-grid-mock span.is-center {
    background: #f24a09;
    color: #fff;
    font-size: 8px;
    letter-spacing: 0.02em;
}

/* Hover: prize ring chase + center “SPIN” button press (like starting a spin). */
.swp-preset-card.default:hover .swp-preset-default-grid-mock span:not(.is-center) {
    animation: swp-preset-mock-chase-cell 1.44s linear infinite;
}

.swp-preset-card.default:hover .swp-preset-default-grid-mock span:nth-child(1) {
    animation-delay: 0s;
}

.swp-preset-card.default:hover .swp-preset-default-grid-mock span:nth-child(2) {
    animation-delay: 0.18s;
}

.swp-preset-card.default:hover .swp-preset-default-grid-mock span:nth-child(3) {
    animation-delay: 0.36s;
}

.swp-preset-card.default:hover .swp-preset-default-grid-mock span:nth-child(6) {
    animation-delay: 0.54s;
}

.swp-preset-card.default:hover .swp-preset-default-grid-mock span:nth-child(9) {
    animation-delay: 0.72s;
}

.swp-preset-card.default:hover .swp-preset-default-grid-mock span:nth-child(8) {
    animation-delay: 0.9s;
}

.swp-preset-card.default:hover .swp-preset-default-grid-mock span:nth-child(7) {
    animation-delay: 1.08s;
}

.swp-preset-card.default:hover .swp-preset-default-grid-mock span:nth-child(4) {
    animation-delay: 1.26s;
}

/* Circle Style: full-bleed thumb, radial dial (12 slots), colorful prize ring */
.swp-preset-preview--circle-style {
    background: linear-gradient(160deg, #ede9f7 0%, #e0dcfa 100%);
    min-height: 0;
    padding: 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: stretch;
}

.swp-preset-circle-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    max-width: 100%;
    padding: 6px;
    margin: 0;
    background: transparent;
    border-bottom: 1px solid #e5e7eb;
}

.swp-preset-circle-dial {
    position: relative;
    width: calc(100% - 4px);
    max-width: 100%;
    margin: 0 auto;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #faf8ff 0%, #e8e4f4 55%, #ddd6f5 100%);
    border: 5px solid #8b9eed;
    box-sizing: border-box;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.45),
        0 4px 14px rgba(100, 120, 190, 0.18);
}

.swp-preset-circle-dial__orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.swp-preset-circle-dial__slot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 13%;
    aspect-ratio: 1;
    margin-left: -6.5%;
    margin-top: -6.5%;
    border-radius: 50%;
    background: #b0c4f4;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(60, 70, 120, 0.12);
    transform-origin: center center;
    transform: rotate(calc(var(--swp-slot-i) * 30deg - 90deg)) translateY(-252%);
    box-sizing: border-box;
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(1) {
    background: linear-gradient(145deg, #ff8fab 0%, #ff6b9d 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(2) {
    background: linear-gradient(145deg, #ffe066 0%, #fcc419 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(3) {
    background: linear-gradient(145deg, #8ce99a 0%, #51cf66 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(4) {
    background: linear-gradient(145deg, #66d9e8 0%, #22b8cf 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(5) {
    background: linear-gradient(145deg, #74c0fc 0%, #339af0 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(6) {
    background: linear-gradient(145deg, #b197fc 0%, #845ef7 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(7) {
    background: linear-gradient(145deg, #e599f7 0%, #cc5de8 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(8) {
    background: linear-gradient(145deg, #ff8787 0%, #fa5252 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(9) {
    background: linear-gradient(145deg, #ffd8a8 0%, #ff922b 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(10) {
    background: linear-gradient(145deg, #a5d8ff 0%, #4dabf7 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(11) {
    background: linear-gradient(145deg, #c0eb75 0%, #82c91e 100%);
}

.swp-preset-circle-dial__orbit .swp-preset-circle-dial__slot:nth-child(12) {
    background: linear-gradient(145deg, #daa520 0%, #e67700 100%);
}

.swp-preset-circle-dial__center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(145deg, #9775fa 0%, #6741d9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: 0.04em;
    z-index: 1;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 2px 8px rgba(80, 50, 160, 0.25);
}

/* Hover: cycle highlight around the 12 prize slots (center SPIN stays static). */
.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot {
    animation: swp-preset-mock-circle-slot-chase 1.8s linear infinite;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(1) {
    animation-delay: 0s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(2) {
    animation-delay: 0.15s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(3) {
    animation-delay: 0.3s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(4) {
    animation-delay: 0.45s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(5) {
    animation-delay: 0.6s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(6) {
    animation-delay: 0.75s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(7) {
    animation-delay: 0.9s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(8) {
    animation-delay: 1.05s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(9) {
    animation-delay: 1.2s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(10) {
    animation-delay: 1.35s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(11) {
    animation-delay: 1.5s;
}

.swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot:nth-child(12) {
    animation-delay: 1.65s;
}

/* Ring Grid preset thumbnail — 3×3 lucky-canvas doc layout (square stage → square cells → true circles). */
.swp-preset-preview--ring-grid {
    background-color: #869cfa;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.swp-preset-ring-grid-mock {
    container-type: size;
    container-name: swp-ring-grid-mock;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: clamp(3px, 2.5%, 8px);
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: clamp(4px, 4%, 10px);
    box-sizing: border-box;
    background: #e9e8fe;
    border-radius: 0;
    box-shadow: inset 0 0 0 1px rgba(134, 156, 250, 0.35);
}

/* Square grid cells → 100%×100% + 50% radius = circles (not ellipses). */
.swp-preset-ring-grid-mock__cell {
    background: #b8c5f2;
    border-radius: 50%;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px rgba(80, 80, 120, 0.12);
}

/* Perimeter prize cells — colorful blocks (ring order: top row L→R, then R edge, bottom R→L, then L edge) */
.swp-preset-ring-grid-mock__cell:nth-child(1) {
    background: linear-gradient(145deg, #ff8fab 0%, #ff6b9d 100%);
}

.swp-preset-ring-grid-mock__cell:nth-child(2) {
    background: linear-gradient(145deg, #ffe066 0%, #fcc419 100%);
}

.swp-preset-ring-grid-mock__cell:nth-child(3) {
    background: linear-gradient(145deg, #8ce99a 0%, #51cf66 100%);
}

.swp-preset-ring-grid-mock__cell:nth-child(4) {
    background: linear-gradient(145deg, #74c0fc 0%, #339af0 100%);
}

.swp-preset-ring-grid-mock__cell:nth-child(6) {
    background: linear-gradient(145deg, #e599f7 0%, #cc5de8 100%);
}

.swp-preset-ring-grid-mock__cell:nth-child(7) {
    background: linear-gradient(145deg, #ffd8a8 0%, #ff922b 100%);
}

.swp-preset-ring-grid-mock__cell:nth-child(8) {
    background: linear-gradient(145deg, #a5d8ff 0%, #4dabf7 100%);
}

.swp-preset-ring-grid-mock__cell:nth-child(9) {
    background: linear-gradient(145deg, #c0eb75 0%, #94d82d 100%);
}

.swp-preset-ring-grid-mock__cell--btn {
    background: linear-gradient(145deg, #9775fa 0%, #6741d9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-size: clamp(7px, 9cqmin, 12px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    line-height: 1;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:not(.swp-preset-ring-grid-mock__cell--btn) {
    animation: swp-preset-mock-ring-chase-cell 1.44s linear infinite;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:nth-child(1) {
    animation-delay: 0s;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:nth-child(2) {
    animation-delay: 0.18s;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:nth-child(3) {
    animation-delay: 0.36s;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:nth-child(6) {
    animation-delay: 0.54s;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:nth-child(9) {
    animation-delay: 0.72s;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:nth-child(8) {
    animation-delay: 0.9s;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:nth-child(7) {
    animation-delay: 1.08s;
}

.swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell:nth-child(4) {
    animation-delay: 1.26s;
}

/* External Spin preset thumbnail — grid + separate “play” strip (lucky-canvas doc style). */
.swp-preset-preview--grid-2x3 {
    background-color: #869cfa;
    padding: clamp(6px, 3%, 12px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: clamp(6px, 2.5%, 10px);
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    container-type: size;
    container-name: swp-grid-2x3-preview;
}

.swp-preset-grid-2x3-mock {
    container-type: size;
    container-name: swp-grid-2x3-mock;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: clamp(3px, 2.5%, 8px);
    width: 100%;
    flex: 0 0 auto;
    aspect-ratio: 3 / 2;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: clamp(4px, 4%, 10px);
    box-sizing: border-box;
    background: unset;
    border-radius: 0;
    box-shadow: inset 0 0 0 1px rgba(134, 156, 250, 0.35);
}

.swp-preset-grid-2x3-mock__cell {
    background: #b8c5f2;
    border-radius: clamp(4px, 18%, 12px);
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 1px 2px rgba(80, 80, 120, 0.12);
}

/* Row-major DOM: full prize grid for External Spin thumbnail */
.swp-preset-grid-2x3-mock__cell:nth-child(1) {
    background: linear-gradient(145deg, #ff8fab 0%, #ff6b9d 100%);
}

.swp-preset-grid-2x3-mock__cell:nth-child(2) {
    background: linear-gradient(145deg, #ffe066 0%, #fcc419 100%);
}

.swp-preset-grid-2x3-mock__cell:nth-child(3) {
    background: linear-gradient(145deg, #8ce99a 0%, #51cf66 100%);
}

.swp-preset-grid-2x3-mock__cell:nth-child(4) {
    background: linear-gradient(145deg, #74c0fc 0%, #339af0 100%);
}

.swp-preset-grid-2x3-mock__cell:nth-child(5) {
    background: linear-gradient(145deg, #e599f7 0%, #cc5de8 100%);
}

.swp-preset-grid-2x3-mock__cell:nth-child(6) {
    background: linear-gradient(145deg, #c0eb75 0%, #94d82d 100%);
}

.swp-preset-grid-2x3-mock__go {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0;
    margin-bottom: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(26px, 11cqmin, 36px);
    padding: 15px clamp(10px, 4cqmin, 14px);
    border-radius: clamp(8px, 2.5cqmin, 12px);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 45%),
        linear-gradient(90deg, #b91c1c 0%, #e45912 44%, #f6ad3a 100%);
    color: #fff;
    font-size: clamp(8px, 9cqmin, 12px);
    font-weight: 800;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
    line-height: 1;
    flex: 0 0 auto;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(120, 42, 12, 0.35);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(120, 45, 10, 0.15),
        0 1px 0 rgba(200, 85, 30, 0.3),
        0 2px 5px rgba(0, 0, 0, 0.12),
        0 4px 10px rgba(190, 75, 25, 0.15);
    transition: box-shadow 0.22s ease;
    user-select: none;
}

.swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__cell {
    animation: swp-preset-mock-chase-cell 0.9s linear infinite;
}

.swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__cell:nth-child(1) {
    animation-delay: 0s;
}

.swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__cell:nth-child(2) {
    animation-delay: 0.15s;
}

.swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__cell:nth-child(3) {
    animation-delay: 0.3s;
}

/* Perimeter clockwise: top L→R (1–3), then bottom R→L (6–4) — matches ring-style “spin” preview. */
.swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__cell:nth-child(4) {
    animation-delay: 0.75s;
}

.swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__cell:nth-child(5) {
    animation-delay: 0.6s;
}

.swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__cell:nth-child(6) {
    animation-delay: 0.45s;
}

.swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__go {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -1px 0 rgba(120, 45, 10, 0.12),
        0 1px 0 rgba(200, 85, 30, 0.35),
        0 4px 12px rgba(200, 75, 30, 0.35),
        0 2px 4px rgba(100, 35, 8, 0.15);
}

.swp-preset-card.swp-preset-grid-2x3.swp-preset-active .swp-preset-grid-2x3-mock__go {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        inset 0 -1px 0 rgba(120, 45, 10, 0.14),
        0 0 0 2px rgba(242, 75, 9, 0.35),
        0 2px 10px rgba(200, 85, 28, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .swp-preset-card:hover .swp-preset-image,
    .swp-preset-card.default:hover .swp-preset-default-thumb--big-wheel .swp-preset-image {
        animation: none;
    }

    .swp-preset-card:hover .swp-preview-btn {
        animation: none;
    }

    .swp-preset-card.default:hover .swp-preset-default-grid-mock span,
    .swp-preset-card.swp-preset-ring-grid:hover .swp-preset-ring-grid-mock__cell,
    .swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__cell,
    .swp-preset-card.swp-preset-grid-2x3:hover .swp-preset-grid-2x3-mock__go,
    .swp-preset-card.swp-preset-circle-style:hover .swp-preset-circle-dial__slot {
        animation: none;
    }
}

/* Checkmark icon */
.swp-preset-checkmark {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: #f24b09;
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(197, 78, 34, 0.3);
}

.swp-preset-card.swp-preset-active {
    border-color: #f35311;
    box-shadow: 0 0 0 1px #f35311;
}

.swp-preset-card.swp-preset-active .swp-preset-checkmark {
    display: flex;
}

.swp-preset-pro-badge,
.swp-preset-new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.swp-preset-new-badge {
    left: 10px;
    right: unset;
}

.swp-preview-btn {
    width: 60px;
    height: 60px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.swp-preset-card:hover .swp-preview-btn {
    transform: translate(-50%, -50%);
}

.swp-preview-arrow {
    width: 56px;
    height: 56px;
    position: absolute;
    top: 30px;
}

.swp-preset-card.gold .swp-preview-btn {
    width: 100px;
    height: 100px;
}

.swp-preset-card.gold .swp-preview-arrow {
    width: 44px;
    height: 44px;
    top: 30px;
}

.swp-preset-card.blitz .swp-preview-arrow,
.swp-preset-card.mega .swp-preview-arrow {
    width: 50px;
    height: 50px;
    top: 30px;
}

.swp-preset-card.mega .swp-preview-btn {
    width: 80px;
    height: 80px;
}

.swp-preset-card.candy .swp-preview-arrow {
    top: 15px;
}



/* Responsive */
@media screen and (max-width: 1400px) {
    .swp-preset-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media screen and (max-width: 1024px) {
    .swp-preset-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media screen and (max-width: 782px) {
    .swp-preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .swp-preset-styles-section {
        padding: 15px;
    }
}

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

/* Preset notification */
/* Preset notification */
.swp-preset-notification {
    position: fixed;
    top: 50px;
    right: 20px;
    background: #fff;
    border-left: 4px solid #46b450;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 99999;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 350px;
}

.swp-preset-notification.show {
    transform: translateX(0);
}

.swp-preset-notification .dashicons {
    color: #46b450;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.swp-preset-notification span:not(.dashicons) {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}


/* add new spin wheel page css start */

.post-type-swp_wheel #poststuff {
    max-width: 1200px;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    margin-top: 20px;
}

.post-type-swp_wheel #poststuff #titlediv #title {
    padding: 5px 8px;
    height: 45px;
    border-color: #e2e4e6;
    border-radius: 6px;
    font-size: 16px;
}

.post-type-swp_wheel #poststuff #titlediv #title:focus,
.post-type-swp_wheel #poststuff #titlediv #title:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: #e2e4e6 !important;
}

.post-type-swp_wheel #poststuff #titlediv #title-prompt-text {
    font-size: 16px;
    padding: 13px 10px;
}

.post-type-swp_wheel #poststuff .postbox {
    border-color: #e2e4e6;
    box-shadow: none;
    border-radius: 6px;
}

.post-type-swp_wheel #poststuff .postbox-header {
    border-color: #e2e4e6;
}

.post-type-swp_wheel #poststuff #publish {
    background: linear-gradient(35deg, #f24101, #f7994c);
    border: none;
    box-shadow: none;
    text-shadow: none;
    color: #fff;
    padding: 4px 26px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

.post-type-swp_wheel #poststuff #publish:hover {
    background: linear-gradient(35deg, #f7994c, #f24101);
}

.post-type-swp_wheel #poststuff #publish:focus {
    box-shadow: 0 0 0 2px rgba(242, 65, 1, 0.3);
    outline: none;
}

/* add new spin wheel page css end */

/* ==========================================================================
   Pro Badge & Upgrade Notices
   ========================================================================== */

.swp-pro-badge,
.swp-preset-new-badge {
    display: inline-block;
    background: linear-gradient(35deg, #f24101, #f7994c);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 3px;
    vertical-align: middle;
    text-transform: uppercase;
}

.swp-upgrade-notice {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.swp-upgrade-notice .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #667eea;
    margin-bottom: 10px;
}

.swp-upgrade-notice h3 {
    margin: 10px 0;
    color: #333;
}

.swp-upgrade-notice p {
    margin: 10px 0 20px;
    color: #666;
}

.swp-upgrade-notice .button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    text-shadow: none;
    box-shadow: none;
}

.swp-upgrade-notice .button-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

/* Disabled Pro Features */
.swp-pro-feature-disabled {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.swp-pro-feature-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

/* Disabled Select Options */
select option:disabled {
    color: #999;
    font-style: italic;
    opacity: 0.5;
}

/* Pro Badge in Select Options */
select option[disabled]::after {
    content: ' 🔒';
}

/* Pro Feature Sections - Reduced Opacity */
.swp-form-row:has(input[disabled]),
.swp-form-row:has(.swp-pro-badge) {
    opacity: 0.6;
}

.swp-form-row:has(input[disabled]) .swp-label,
.swp-form-row:has(.swp-pro-badge) .swp-label {
    opacity: 1;
}

/* Disabled inputs and toggles */
input[disabled],
input[disabled]+.swp-toggle-switch,
input[disabled]~.swp-toggle-text {
    opacity: 0.5;
    cursor: not-allowed;
}

.swp-settings-content-wrapper .swp-toggle-label input {
    width: auto;
}

/* ==========================================================================
   Upgrade Modal
   ========================================================================== */

.swp-upgrade-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: swpFadeIn 0.2s ease;
}

@keyframes swpFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.swp-upgrade-modal {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: swpSlideUp 0.3s ease;
}

@keyframes swpSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.swp-upgrade-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.swp-upgrade-modal-close:hover {
    background: #f0f0f0;
    color: #000;
}

.swp-upgrade-modal-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f24101, #f7994c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swp-upgrade-modal-icon .dashicons {
    font-size: 25px;
    width: 25px;
    height: 25px;
    color: #fff;
}

.swp-upgrade-modal h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 15px;
    color: #1d2327;
}

.swp-upgrade-modal p {
    font-size: 14px;
    color: #646970;
    margin: 0 0 10px;
    line-height: 1.6;
}

.swp-upgrade-modal p:last-of-type {
    margin-bottom: 20px;
}

.swp-upgrade-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.swp-upgrade-btn {
    background: linear-gradient(135deg, #f24101, #f7994c) !important;
    border: none !important;
    color: #fff !important;
    padding: 11px 15px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    height: 42px;
    outline: none !important;
}

a.button.button-primary.swp-upgrade-btn:hover {
    background: linear-gradient(135deg, #f7994c, #f24101) !important;
    box-shadow: 0 6px 20px rgba(242, 65, 1, 0.4) !important;
    transform: translateY(-2px);
}

.swp-upgrade-btn:focus {
    box-shadow: 0 0 0 2px rgba(242, 65, 1, 0.3);
    outline: none;
}

.swp-upgrade-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.swp-modal-cancel {
    background: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    color: #666 !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
}

.swp-modal-cancel:hover {
    background: #e0e0e0 !important;
    border-color: #ccc !important;
    color: #333 !important;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .swp-upgrade-modal {
        padding: 30px 20px;
    }

    .swp-upgrade-modal h2 {
        font-size: 20px;
    }

    .swp-upgrade-modal-actions {
        flex-direction: column;
    }

    .swp-upgrade-btn,
    .swp-modal-cancel {
        width: 100%;
        justify-content: center;
    }
}

/* footer css here  */
.swp-admin-footer {
    text-align: center;
    padding: 10px 10px;
    font-size: 14px;
    color: #424346;
}

.swp-love {
    color: #f24101;
}

.swp-admin-footer a {
    color: currentColor;
    text-decoration: none;
    font-weight: 600;
}

.swp-admin-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Tooltip Styles
   ========================================================================== */

.swp-tooltip-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
}

.swp-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    background: #646970;
    color: #fff;
    border-radius: 50%;
    cursor: help;
    transition: all 0.2s ease;
}

.swp-tooltip-icon:hover {
    background: #f24101;
    transform: scale(1.1);
}

.swp-tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(35deg, #f24101, #f7994c);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    white-space: normal;
    width: 280px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    text-align: left;
    line-height: 1.4;
}

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

.swp-tooltip-wrapper:hover .swp-tooltip-text {
    visibility: visible;
    opacity: 1;
}