/* ============================================
   EASY LABEL - Admin Settings Page Styles
   ============================================ */

/* Tab Styles */
.nav-tab-wrapper {
    margin-bottom: 20px;
}

/* ============================================
   LABELS EDITOR STYLES
   ============================================ */

.labels-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Responsive: su schermi piccoli torna a 1 colonna */
@media screen and (max-width: 1200px) {
    .labels-container {
        grid-template-columns: 1fr;
    }
}

.label-editor-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    overflow: hidden;
}

.label-editor-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #2271b1;
}

.label-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #e1e3e6;
    cursor: pointer;
    user-select: none;
}

.label-preview-large {
    flex-grow: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.label-badge {
    display: inline-block;
    padding: 8px 16px;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.remove-label-btn {
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-label-btn:hover {
    background: #a00;
    transform: scale(1.1);
}

.remove-label-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.label-header-post-types {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.header-post-type-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f0fe;
    color: #2271b1;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #c5d9f5;
    white-space: nowrap;
}

.label-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label-btn {
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #c3c4c7;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toggle-label-btn:hover {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.toggle-label-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.label-editor-card.collapsed .toggle-label-btn .dashicons {
    transform: rotate(-90deg);
}

.label-editor-card.collapsed .label-editor-header {
    border-bottom-color: transparent;
}

.label-editor-body {
    padding: 20px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
    opacity: 1;
}

.label-editor-card.collapsed .label-editor-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.label-field-group {
    margin-bottom: 16px;
}

.label-field-group.flex-grow {
    flex-grow: 1;
}

.label-field-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

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

.label-key-input,
.label-name-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.label-key-input:focus,
.label-name-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.label-key-input {
    background: #f6f7f7;
    color: #646970;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-color-input,
.border-color-input {
    width: 48px;
    height: 48px;
    border: 2px solid #8c8f94;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.label-color-input:hover,
.label-color-input:focus,
.border-color-input:hover,
.border-color-input:focus {
    border-color: #2271b1;
}

.color-hex-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: #646970;
    background: #f6f7f7;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #e1e3e6;
}

.field-description {
    color: #646970;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.field-description-spaced {
    margin-top: 8px;
    color: #666;
}

.field-description-indented {
    margin-left: 24px;
    display: block;
    color: #666;
}

.field-description-with-bottom-gap {
    margin-bottom: 12px;
}

.icon-accent {
    color: #2271b1;
}

.icon-sm {
    font-size: 16px;
}

.label-display-options {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

.label-checkbox-option-spaced {
    margin-bottom: 12px;
}

.default-label-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.default-label-row .label-name-input {
    flex: 1;
}

/* ============================================
   PERMISSIONS STYLES
   ============================================ */

.permissions-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 100%;
}

.permission-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s ease;
}

.permission-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #2271b1;
}

.permission-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #e1e3e6;
}

.permission-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #2271b1;
    color: white;
    border-radius: 8px;
    font-size: 24px;
}

.permission-title h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #1d2327;
}

.permission-title p {
    margin: 0;
    color: #646970;
    font-size: 14px;
}

.permission-body {
    padding: 20px;
}

.admin-always-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #0f5132;
}

.admin-always-notice .dashicons {
    color: #198754;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.role-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e1e3e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.role-checkbox:hover {
    background: #f0f6ff;
    border-color: #2271b1;
}

.role-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #8c8f94;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.role-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #2271b1;
    border-color: #2271b1;
}

.role-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.role-name {
    font-weight: 500;
    color: #1d2327;
}

/* ============================================
   POST TYPES STYLES
   ============================================ */

.post-types-container {
    max-width: 100%;
}

.post-type-intro-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    height: 80px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.intro-icon {
    width: 64px;
    height: 64px;
    background: #2271b1;
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.intro-content h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #1d2327;
}

.intro-content p {
    margin: 0;
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

.post-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .post-types-grid {
        grid-template-columns: 1fr;
    }
}

.post-type-card {
    display: block;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.post-type-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.post-type-card input[type="checkbox"] {
    display: none;
}

.post-type-card input[type="checkbox"]:checked + .post-type-content {
    border-color: #2271b1;
    background: #f0f6ff;
}

.post-type-card input[type="checkbox"]:checked + .post-type-content .status-indicator {
    background: #198754;
}

.post-type-card input[type="checkbox"]:checked + .post-type-content .status-text {
    color: #198754;
}

.post-type-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-type-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.post-type-icon {
    width: 36px;
    height: 36px;
    background: #f6f7f7;
    color: #646970;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.post-type-name {
    margin: 0;
    font-size: 16px;
    color: #1d2327;
    font-weight: 600;
}

.post-type-details {
    flex-grow: 1;
    margin-bottom: 16px;
}

.post-type-key {
    display: inline-block;
    background: #f6f7f7;
    color: #646970;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    margin-bottom: 8px;
}

.post-type-description {
    margin: 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.4;
}

.post-type-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8c8f94;
    transition: background-color 0.3s ease;
}

.status-text {
    color: #8c8f94;
    transition: color 0.3s ease;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.label-editor-card.new-label,
.widget-editor-card.new-label {
    animation: slideInUp 0.3s ease-out;
}

/* ============================================
   LANGUAGE TAB STYLES
   ============================================ */

.language-container {
    max-width: 100%;
}

.language-intro-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.language-intro-card .intro-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.language-intro-card .intro-content h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #1d2327;
}

.language-intro-card .intro-content p {
    margin: 0;
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.language-card {
    display: block;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.language-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.language-card input[type="radio"] {
    display: none;
}

.language-card.selected {
    border-color: #2271b1;
    background: #f0f6ff;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
}

.language-card.selected .language-status .status-check {
    opacity: 1;
    transform: scale(1);
}

.language-content {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.language-flag {
    font-size: 48px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7f7;
    border-radius: 8px;
    flex-shrink: 0;
}

.language-info {
    flex-grow: 1;
}

.language-name {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #1d2327;
    font-weight: 600;
}

.language-code {
    margin: 0;
    color: #646970;
    font-size: 13px;
}

.language-status {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-status .status-check {
    width: 28px;
    height: 28px;
    background: #2271b1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.language-info-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fff9e6;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin-top: 24px;
}

.language-info-box .info-icon {
    width: 40px;
    height: 40px;
    background: #ffc107;
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.language-info-box .info-content h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #1d2327;
}

.language-info-box .info-content ul {
    margin: 0;
    padding-left: 20px;
    color: #646970;
    font-size: 14px;
    line-height: 1.6;
}

.language-info-box .info-content ul li {
    margin-bottom: 6px;
}

.language-info-box .info-content ul li:last-child {
    margin-bottom: 0;
}

/* ============================================
   GENERAL CARD STYLES
   ============================================ */

.card {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.card h2,
.card h3 {
    margin-top: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media screen and (max-width: 768px) {
    .labels-container {
        grid-template-columns: 1fr;
    }
    
    .label-field-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .label-editor-header {
        padding: 12px 16px;
    }
    
    .label-editor-body {
        padding: 16px;
    }
}

@media screen and (max-width: 782px) {
    .content-labels-instructions {
        max-width: 100%;
    }
    
    .instruction-section {
        padding: 10px;
    }
}

/* ============================================
   DEFAULT LABELS TAB STYLES
   ============================================ */

/* Toggle switch inline per etichette di default */
.default-label-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch-inline {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

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

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

.switch-inline input:checked + .slider-inline {
    background: linear-gradient(135deg, #2271b1, #1e5a8e);
}

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

/* Reset button per default labels */
.reset-default-label-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #2c3338;
    transition: all 0.2s ease;
}

.reset-default-label-btn:hover {
    background: #dcdcde !important;
    border-color: #8c8f94 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.reset-default-label-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.reset-default-label-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.reset-default-label-btn:hover .dashicons {
    transform: rotate(-15deg);
}

/* Border Style Radio Buttons */
/* Border Style Radio Buttons */
.border-style-options {
    width: 100%;
}

.border-style-options-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.border-style-radio {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 18px 12px;
    border: 2px solid #dcdcde;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    text-align: center;
    min-height: 100px;
    overflow: hidden;
}

.border-style-radio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 113, 177, 0.03) 0%, rgba(34, 113, 177, 0) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.border-style-radio:hover {
    border-color: #2271b1;
    background: #f6f7f7;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.2);
}

.border-style-radio:hover::before {
    opacity: 1;
}

.border-style-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.border-style-radio::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: 2px solid #c3c4c7;
    border-radius: 50%;
    background: white;
    transition: all 0.25s ease;
}

.border-style-radio .radio-label {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    transition: all 0.25s ease;
    width: 100%;
}

.border-style-radio .radio-label strong {
    font-weight: 600;
    font-size: 13px;
    color: #2c3338;
    transition: color 0.25s ease;
}

.border-style-radio .border-preview-line {
    display: block;
    width: 60px;
    height: 0;
    border-top: 3px solid #8c8f94;
    transition: all 0.25s ease;
}

.border-style-radio[data-border-style="none"] .border-preview-line {
    border-top-style: solid;
}

.border-style-radio[data-border-style="solid"] .border-preview-line {
    border-top-style: solid;
}

.border-style-radio[data-border-style="dashed"] .border-preview-line {
    border-top-style: dashed;
}

.border-style-radio[data-border-style="dotted"] .border-preview-line {
    border-top-style: dotted;
}

.border-style-radio[data-border-style="double"] .border-preview-line {
    border-top-style: double;
    border-top-width: 4px;
}

.border-style-radio:has(input:checked) {
    border-color: #2271b1;
    background: linear-gradient(135deg, #f0f6fc 0%, #ffffff 100%);
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.3), 0 0 0 1px #2271b1;
    transform: translateY(-3px);
}

.border-style-radio:has(input:checked)::before {
    opacity: 1;
}

.border-style-radio:has(input:checked)::after {
    border-color: #2271b1;
    background: #2271b1;
    box-shadow: inset 0 0 0 4px white;
}

.border-style-radio:has(input:checked) .radio-label strong {
    color: #2271b1;
    font-weight: 700;
}

.border-style-radio:has(input:checked) .border-preview-line {
    border-top-color: #2271b1;
    transform: scaleX(1.1);
}

/* Animazione al click */
.border-style-radio:active {
    transform: translateY(-1px) scale(0.98);
}

/* Responsive per default labels */
@media (max-width: 768px) {}

.border-style-radio:has(input:checked) .radio-label {
    color: #2271b1;
}

.border-style-radio:has(input:checked) .radio-label strong {
    font-weight: 700;
}

/* Responsive per default labels */
@media (max-width: 768px) {
    .label-editor-header .default-label-toggle {
        margin-top: 8px;
    }
}

/* Border Color Field - Spaziatura e allineamento */
.none-border-color-field,
.all-border-color-field {
    padding-left: 20px;
    padding-right: 20px;
}

.none-border-color-field .color-picker-wrapper,
.all-border-color-field .color-picker-wrapper {
    margin-left: 0;
}

/* ============================================
   GENERAL SETTINGS PAGE - CARD RADIO BUTTONS
   ============================================ */

.general-settings-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    max-width: none;
}

@media (max-width: 1200px) {
    .general-settings-container {
        grid-template-columns: 1fr;
    }
}

.setting-section {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.setting-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #2271b1;
}

.setting-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.setting-description {
    margin: 0 0 20px 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.5;
}

/* Reuse existing border-style-options style */
.setting-section .border-style-options {
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.setting-section .border-style-radio {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #dcdcde;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    width: 100%;
}

.setting-section .border-style-radio:hover {
    border-color: #2271b1;
    background: #f6f7f7;
}

.setting-section .border-style-radio:has(input:checked) {
    border-color: #2271b1;
    background: #f0f6fc;
    box-shadow: 0 0 0 1px #2271b1;
}

.setting-section .border-style-radio input[type="radio"],
.setting-section .border-style-radio input[type="checkbox"] {
    margin: 0 12px 0 0;
    flex-shrink: 0;
}

.setting-section .radio-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}

.setting-section .radio-content .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #646970;
    flex-shrink: 0;
}

.setting-section .border-style-radio:has(input:checked) .radio-content .dashicons {
    color: #2271b1;
}

.setting-section .radio-content strong {
    font-size: 14px;
    color: #1d2327;
    font-weight: 500;
}

.setting-section .border-style-radio:has(input:checked) .radio-content strong {
    font-weight: 600;
    color: #2271b1;
}

/* Responsive per General Settings */
@media (max-width: 782px) {
    .setting-section {
        padding: 20px 16px;
    }
    
    .setting-section .border-style-radio {
        padding: 14px 16px;
    }
    
    .setting-section .radio-content strong {
        font-size: 13px;
    }
}

/* ============================================
   BACKUP & RESTORE PAGE
   ============================================ */

.backup-restore-container {
    max-width: 100%;
}

.backup-export-section,
.backup-import-section {
    margin-bottom: 24px;
}

.setting-section .setting-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-section .setting-title .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #2271b1;
}

.backup-actions {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.button-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px !important;
    height: auto !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.button-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.button-hero:hover::before {
    left: 100%;
}

.button-hero.button-primary {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%) !important;
    color: #fff !important;
}

.button-hero.button-primary:hover {
    background: linear-gradient(135deg, #135e96 0%, #0a4b78 100%) !important;
    box-shadow: 0 6px 16px rgba(34, 113, 177, 0.3) !important;
    transform: translateY(-2px);
}

.button-hero.button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2) !important;
}

.button-hero.button-secondary {
    background: linear-gradient(135deg, #f6f7f7 0%, #e8eaeb 100%) !important;
    color: #2c3338 !important;
    border: 2px solid #dcdcde !important;
}

.button-hero.button-secondary:hover {
    background: linear-gradient(135deg, #e8eaeb 0%, #dcdcde 100%) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-2px);
    border-color: #c3c4c7 !important;
}

.button-hero.button-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.button-hero .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block;
    vertical-align: middle;
}

#export-settings .dashicons {
    animation: bounce 2s ease-in-out infinite;
}

#import-settings .dashicons {
    animation: bounce 2s ease-in-out infinite;
    animation-delay: 0.3s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

.backup-preview {
    background: #f6f7f7;
    border-left: 4px solid #2271b1;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.backup-preview h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.backup-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.backup-items-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: #50575e;
    font-size: 13px;
}

.backup-items-list li .dashicons {
    color: #46b450;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.selected-file-name {
    font-size: 13px;
    color: #50575e;
    font-style: italic;
}

.selected-file-name:not(:empty) {
    padding: 8px 12px;
    background: #f0f6fc;
    border: 1px solid #2271b1;
    border-radius: 4px;
    color: #2271b1;
    font-style: normal;
}

.backup-warning {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #fff3cd;
    border-left: 4px solid #f0ad4e;
    border-radius: 4px;
    margin-top: 20px;
}

.backup-warning .dashicons {
    color: #f0ad4e;
    font-size: 20px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.backup-warning div {
    flex: 1;
}

.backup-warning strong {
    color: #856404;
    display: block;
    margin-bottom: 4px;
}

.backup-warning div:not(strong) {
    color: #856404;
    font-size: 13px;
    line-height: 1.6;
}

/* Responsive per Backup */
@media (max-width: 782px) {
    .button-hero {
        width: 100%;
        justify-content: center;
        padding: 10px 20px !important;
    }
    
    .file-upload-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .backup-warning {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===================================
   Support Us Tab
   =================================== */

.support-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
    max-width: 100%;
}

.support-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.support-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #2271b1;
}

.support-card-featured {
    border-color: #2271b1;
    border-width: 3px;
    background: linear-gradient(135deg, #f0f6fc 0%, #ffffff 100%);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.coffee-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.support-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 12px 0;
}

.support-price {
    font-size: 36px;
    font-weight: 700;
    color: #2271b1;
    margin: 16px 0;
    line-height: 1;
}

.support-card p {
    color: #50575e;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 24px 0;
    min-height: 60px;
}

.button-support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%) !important;
    color: #fff !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.2) !important;
}

.button-support:hover {
    background: linear-gradient(135deg, #135e96 0%, #0a4b78 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 113, 177, 0.35) !important;
}

.button-support:active {
    transform: translateY(0);
}

.button-support .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block;
    vertical-align: middle;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.support-thanks {
    background: linear-gradient(135deg, #f0f6fc 0%, #ffffff 100%);
    border-left: 4px solid #2271b1;
    padding: 24px;
    border-radius: 8px;
    margin-top: 32px;
    text-align: center;
}

.support-thanks p {
    margin: 8px 0;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.6;
}

.support-thanks strong {
    font-size: 16px;
    color: #2271b1;
}

/* Responsive Support */
@media (max-width: 782px) {
    .support-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .support-card {
        padding: 28px 20px;
    }
    
    .coffee-icon {
        font-size: 40px;
    }
    
    .support-price {
        font-size: 32px;
    }
    
    .support-card p {
        min-height: auto;
    }
}

/* ============================================
   WIDGETS EDITOR STYLES (IDENTICAL TO LABELS)
   ============================================ */

.widgets-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Responsive: su schermi piccoli torna a 1 colonna */
@media screen and (max-width: 1200px) {
    .widgets-container {
        grid-template-columns: 1fr;
    }
}

.widget-editor-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    overflow: hidden;
}

.widget-editor-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #2271b1;
}

.widget-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #e1e3e6;
    cursor: pointer;
    user-select: none;
}

.widget-preview-large {
    flex-grow: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.remove-widget-btn {
    background: #dc3232;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-widget-btn:hover {
    background: #a00;
    transform: scale(1.1);
}

.remove-widget-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.widget-header-info {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.header-widget-viz-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f5e8;
    color: #2e7d32;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #b8ddb8;
    white-space: nowrap;
}

.widget-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-widget-btn {
    background: #f0f0f1;
    color: #50575e;
    border: 1px solid #c3c4c7;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toggle-widget-btn:hover {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.toggle-widget-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.widget-editor-card.collapsed .toggle-widget-btn .dashicons {
    transform: rotate(-90deg);
}

.widget-editor-card.collapsed .widget-editor-header {
    border-bottom-color: transparent;
}

.widget-editor-body {
    padding: 20px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
    opacity: 1;
}

.widget-editor-card.collapsed .widget-editor-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.widget-field-group {
    margin-bottom: 16px;
}

.widget-field-group.flex-grow {
    flex-grow: 1;
}

.widget-field-row {
    display: block;
}

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

.widget-title-input,
.widget-post-type-select,
.widget-visualization-select,
.widget-bar-orientation-select,
.widget-bar-display-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.widget-title-input:focus,
.widget-post-type-select:focus,
.widget-visualization-select:focus,
.widget-bar-orientation-select:focus,
.widget-bar-display-select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 1px #2271b1;
}

.widget-labels-inclusion {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e1e1e1;
}

.widget-labels-title {
    font-weight: 600;
    color: #23282d;
    margin-bottom: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-labels-title .dashicons {
    color: #2271b1;
}

.labels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

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

.label-checkbox:hover {
    background: #e8f4fd;
    border-color: #0073aa;
}

.label-checkbox input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.label-checkbox.all-labels-checkbox {
    grid-column: 1 / -1;
    background: #e8f4fd;
    border-color: #2271b1;
    font-weight: 600;
}

.label-name {
    color: #555;
    font-size: 12px;
    transition: all 0.2s ease;
}

.hidden-file-input,
.is-hidden {
    display: none;
}

.widget-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.widget-preview-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.widget-two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.widget-bar-chart-options {
    margin-top: 15px;
}

.widget-selected-labels-container {
    margin-top: 15px;
}

.widget-selected-labels-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #23282d;
}

.widget-selected-labels-title .dashicons {
    font-size: 16px;
    margin-right: 5px;
}

.widget-selected-labels-note {
    font-weight: 400;
    color: #666;
    font-size: 12px;
}

.widget-selected-labels-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    min-height: 50px;
}

.widget-sortable-label {
    cursor: move;
    padding: 6px 12px;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widget-sortable-label .dashicons {
    font-size: 14px;
}

.system-info-section {
    margin-bottom: 30px;
}

.system-info-title {
    margin-bottom: 15px;
    font-size: 18px;
}

.system-info-card {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.system-info-table {
    border: none;
}

.system-info-label,
.system-info-value {
    padding: 10px;
}

.system-info-label {
    font-weight: 600;
}

.system-info-section tbody tr:first-child .system-info-label {
    width: 200px;
}

.system-info-row-alt {
    background: #f9f9f9;
}

.system-info-path {
    font-family: Monaco, Menlo, Ubuntu Mono, monospace;
    font-size: 12px;
}

@media (max-width: 782px) {
    .widget-two-col-grid {
        grid-template-columns: 1fr;
    }
}
