/* ===============================================
   ADMIN PANEL STYLING - WP ACCESSIBILITY PLUGIN
   Design coerente con il widget frontend
   =============================================== */

/* Variabili CSS coerenti con il widget */
:root {
    --wp-accessibility-primary: #1b7958;
    --wp-accessibility-primary-hover: #186B4F;
    --wp-accessibility-secondary: #43A57E;
    --wp-accessibility-light: #E9F7F1;
    --wp-accessibility-light-hover: #C9E9DE;
    --wp-accessibility-grey-light: #F8F9FA;
    --wp-accessibility-grey-border: #E4E7EB;
    --wp-accessibility-text: #1A1A1A;
    --wp-accessibility-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --wp-accessibility-radius: 12px;
    --wp-accessibility-transition: all 0.3s ease;
}

/* Container principale */
.axesweb-a11y-admin {
    max-width: 1200px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header con logo/titolo */
.axesweb-a11y-header {
    background: linear-gradient(135deg, var(--wp-accessibility-primary) 0%, var(--wp-accessibility-secondary) 100%);
    color: white;
    padding: 30px;
    border-radius: var(--wp-accessibility-radius) var(--wp-accessibility-radius) 0 0;
    margin-bottom: 0;
    box-shadow: var(--wp-accessibility-shadow);
}

.axesweb-a11y-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    margin-bottom: 15px;
}

.axesweb-a11y-header .dashicons {
    font-size: 25px!important;
    color:white;
}

.axesweb-a11y-subtitle {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
    font-weight: 400;
}

/* Sistema di Tab */
.axesweb-a11y-tabs {
    background: white;
    border-radius: 0 0 var(--wp-accessibility-radius) var(--wp-accessibility-radius);
    box-shadow: var(--wp-accessibility-shadow);
    overflow: hidden;
}

.axesweb-a11y-tab-nav {
    display: flex;
    background: var(--wp-accessibility-grey-light);
    border-bottom: 1px solid var(--wp-accessibility-grey-border);
    margin: 0;
    padding: 0;
}

.axesweb-a11y-tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--wp-accessibility-transition);
    color: var(--wp-accessibility-text);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.axesweb-a11y-tab-button:hover {
    background: var(--wp-accessibility-light-hover);
    color: var(--wp-accessibility-primary);
}

.axesweb-a11y-tab-button.active {
    background: white;
    color: var(--wp-accessibility-primary);
    font-weight: 600;
}

.axesweb-a11y-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--wp-accessibility-primary);
}

.axesweb-a11y-tab-button .dashicons {
    font-size: 18px;
}

/* Contenuto Tab */
.axesweb-a11y-tab-content {
    padding: 30px;
    min-height: 400px;
}

.axesweb-a11y-tab-pane {
    display: none;
}

.axesweb-a11y-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Cards e Sezioni */
.axesweb-a11y-card {
    background: white;
    border: 1px solid var(--wp-accessibility-grey-border);
    border-radius: var(--wp-accessibility-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: var(--wp-accessibility-transition);
}

.axesweb-a11y-card-welcome{
    background: white;
    border: 1px solid var(--wp-accessibility-grey-border);
    border-radius: 0 0 var(--wp-accessibility-radius) var(--wp-accessibility-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: var(--wp-accessibility-transition);
}

.axesweb-a11y-card:hover, .axesweb-a11y-card-welcome:hover {
    box-shadow: var(--wp-accessibility-shadow);
}

.axesweb-a11y-card h3, .axesweb-a11y-card-welcome h3 {
    margin: 0 0 16px 0;
    color: var(--wp-accessibility-primary);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.axesweb-a11y-card .dashicons {
    color: var(--wp-accessibility-secondary);
}

.axesweb-a11y-card-welcome .dashicons.axes-white, .dashicons.axes-white {
    color:white!important;
}

/* Form Styling */
.axesweb-a11y-form-row {
    margin-bottom: 24px;
}

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

.axesweb-a11y-label {
    display: block;
    font-weight: 600;
    color: var(--wp-accessibility-text);
    margin-bottom: 8px;
    font-size: 14px;
}

.axesweb-a11y-input,
.axesweb-a11y-select {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    border: 1px solid var(--wp-accessibility-grey-border)!important;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--wp-accessibility-transition);
    background: white;
}

.axesweb-a11y-input:focus,
.axesweb-a11y-select:focus {
    outline: none;
    border-color: var(--wp-accessibility-primary);
    box-shadow: 0 0 0 3px rgba(27, 121, 88, 0.1);
}

.axesweb-a11y-description {
    margin-top: 6px;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* Checkbox styling */
.axesweb-a11y-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.axesweb-a11y-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--wp-accessibility-grey-border);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: var(--wp-accessibility-transition);
}

.axesweb-a11y-checkbox:checked {
    background: var(--wp-accessibility-primary);
    border-color: var(--wp-accessibility-primary);
}

.axesweb-a11y-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Position Selector */
.axesweb-a11y-position-selector {
    margin: 16px 0;
}

.position-preview-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.position-preview-page {
    width: 480px;
    height: 320px;
    background: #ffffff;
    border: 2px solid var(--wp-accessibility-grey-border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.position-preview-page::before {
    content: 'Clicca sui pallini per scegliere la posizione';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--wp-accessibility-grey-border);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.position-preview-header {
    padding: 20px;
    background: var(--wp-accessibility-grey-light);
    border-bottom: 1px solid var(--wp-accessibility-grey-border);
}

.preview-header-line {
    height: 8px;
    background: var(--wp-accessibility-grey-border);
    border-radius: 4px;
    margin-bottom: 8px;
}

.preview-header-line.short {
    width: 60%;
}

.position-preview-content {
    padding: 20px;
}

.preview-content-line {
    height: 6px;
    background: var(--wp-accessibility-grey-border);
    border-radius: 3px;
    margin-bottom: 12px;
}

.preview-content-line.short {
    width: 40%;
}

/* Pallino verde che si muove */


/* Aree cliccabili visibili */
.position-option {
    position: absolute;
    width: 44px;
    height: 44px;
    cursor: pointer;
    border-radius: 50%;
    transition: var(--wp-accessibility-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: rgba(27, 121, 88, 0.15);
    border: 2px solid transparent;
}

.position-option input[type="radio"] {
    display: none;
}

/* Hover solo quando NON è attivo */
.position-option:not(.active):hover {
    background: rgba(27, 121, 88, 0.25);
    border-color: var(--wp-accessibility-secondary);
    transform: scale(1.1);
}

.position-option::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--wp-accessibility-secondary);
    border-radius: 50%;
    opacity: 0.8;
    transition: var(--wp-accessibility-transition);
}

.position-option:not(.active):hover::before {
    opacity: 1;
    transform: scale(1.2);
}

/* Stato attivo per l'opzione selezionata */
.position-option.active {
    background: rgba(27, 121, 88, 0.25);
    border-color: var(--wp-accessibility-secondary);
    transform: scale(1.1);
}

.position-option.active::before {
    background: var(--wp-accessibility-primary);
    opacity: 1;
    transform: scale(1.3);
}

/* Posizioni delle aree cliccabili */
.position-option.position-top-left {
    top: 8px;
    left: 8px;
}

.position-option.position-center-left {
    top: calc(50% - 22px);
    left: 8px;
}

.position-option.position-bottom-left {
    bottom: 8px;
    left: 8px;
}

.position-option.position-bottom-right {
    bottom: 8px;
    right: 8px;
}

.position-option.position-center-right {
    top: calc(50% - 22px);
    right: 8px;
}

.position-option.position-top-right {
    top: 8px;
    right: 8px;
}

/* Premium Teaser */
.axesweb-a11y-premium-teaser {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.axesweb-a11y-premium-teaser::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
}

.axesweb-a11y-premium-teaser h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.axesweb-a11y-premium-teaser p {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
}

.axesweb-a11y-premium-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    text-align: left;
}

.axesweb-a11y-premium-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #475569;
    font-weight: 500;
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.axesweb-a11y-premium-features li:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.axesweb-a11y-premium-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.axesweb-a11y-premium-features li::after {
    content: '✓';
    position: absolute;
    left: 16px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    transform: translateX(-50%);
}

/* Button Styling */
.axesweb-a11y-button {
    background: var(--wp-accessibility-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--wp-accessibility-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.axesweb-a11y-button:hover {
    background: var(--wp-accessibility-primary-hover);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--wp-accessibility-shadow);
}

.axesweb-a11y-button.secondary {
    background: var(--wp-accessibility-grey-border);
    color: var(--wp-accessibility-text);
}

.axesweb-a11y-button.secondary:hover {
    background: var(--wp-accessibility-grey-light);
    color: var(--wp-accessibility-text);
}

.axesweb-a11y-button.premium {
    margin-top: 24px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 600;
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5), 0 2px 4px -1px rgba(59, 130, 246, 0.3);
}

.axesweb-a11y-button.premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #2563eb, #1e40af);
}

/* Info Box */
.axesweb-a11y-info-box {
    background: var(--wp-accessibility-light);
    border-left: 4px solid var(--wp-accessibility-primary);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
}

.axesweb-a11y-info-box h4 {
    margin: 0 0 8px 0;
    color: var(--wp-accessibility-primary);
}

.axesweb-a11y-info-box ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    list-style: disc;
}

.axesweb-a11y-info-box li {
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
}

/* Success Message */
.axesweb-a11y-success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.axesweb-a11y-success .dashicons {
    color: #28A745;
}

/* Theme Selector */
.axesweb-a11y-theme-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 16px 0;
}

.theme-option {
    position: relative;
    cursor: pointer;
}

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

.theme-preview {
    background: white;
    border: 2px solid var(--wp-accessibility-grey-border);
    border-radius: 12px;
    padding: 20px;
    transition: var(--wp-accessibility-transition);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.theme-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--wp-accessibility-grey-border);
    transition: var(--wp-accessibility-transition);
}

.theme-preview:hover {
    border-color: var(--wp-accessibility-secondary);
    transform: translateY(-2px);
    box-shadow: var(--wp-accessibility-shadow);
}

.theme-option input[type="radio"]:checked + .theme-preview {
    border-color: var(--wp-accessibility-primary);
    box-shadow: 0 0 0 3px rgba(27, 121, 88, 0.1);
}

.theme-option input[type="radio"]:checked + .theme-preview::before {
    background: var(--wp-accessibility-primary);
}

.theme-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.theme-info {
    flex: 1;
}

.theme-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--wp-accessibility-text);
}

.theme-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
}

.theme-colors {
    display: flex;
    gap: 8px;
}

.color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Theme-specific preview styles */
.green-theme::before {
    background: #1B7958;
}

.black-theme::before {
    background: #1A1A1A;
}

.red-theme::before {
    background: #DC3545;
}

.blueLight-theme::before {
    background: #007BFF;
}

.blueDark-theme::before {
    background: #1E3A8A;
}

/* Stili per il campo URL */
.axesweb-a11y-input[type="url"] {
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.axesweb-a11y-info-box {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.axesweb-a11y-info-box a {
    color: #0ea5e9;
    text-decoration: underline;
}

.axesweb-a11y-info-box a:hover {
    color: #0369a1;
}

/* Responsive */
@media (max-width: 768px) {
    .axesweb-a11y-tab-nav {
        flex-direction: column;
    }
    
    .axesweb-a11y-tab-button {
        text-align: left;
        justify-content: flex-start;
        padding: 16px 20px;
    }
    
    .position-preview-page {
        width: 100%;
        max-width: 400px;
        height: 260px;
    }
    
    .position-preview-page::before {
        font-size: 12px;
        padding: 0 16px;
    }
    
    .position-option {
        width: 38px;
        height: 38px;
    }
    
    .position-option.position-center-left {
        top: calc(50% - 19px);
    }
    
    .position-option.position-center-right {
        top: calc(50% - 19px);
    }
    

    
    .axesweb-a11y-premium-features {
        grid-template-columns: 1fr;
    }
    
    .axesweb-a11y-theme-selector {
        grid-template-columns: 1fr;
    }
    
    .theme-preview {
        padding: 16px;
    }
    
    .theme-icon {
        font-size: 24px;
    }
    
    .axesweb-a11y-premium-teaser {
        padding: 24px 20px;
    }
    
    .axesweb-a11y-premium-teaser h3 {
        font-size: 20px;
    }
    
    .axesweb-a11y-button.premium {
        padding: 12px 20px;
        font-size: 14px;
    }
} 