/* Main Container */
.wppes-survey-container {
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #333;
    position: relative;
    overflow: hidden;
}

/* Header & Icons */
.wppes-header-icon {
    text-align: center;
    margin-bottom: 15px;
}

.wppes-header-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #007bff;
}

.wppes-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #2c3e50;
    text-align: center;
    border: none;
}

.wppes-section-desc {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* Progress Bar */
.wppes-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    gap: 10px;
}

.wppes-progress-step {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    transition: all 0.4s ease;
}

.wppes-progress-step.active {
    background: linear-gradient(90deg, #007bff, #00d4ff);
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

/* Form Groups */
.wppes-form-group {
    margin-bottom: 35px;
}

.wppes-label {
    display: block;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.wppes-separator {
    height: 1px;
    background: #eee;
    margin: 40px 0;
}

/* Option Cards (Checkbox/Radio) */
.wppes-radio-group,
.wppes-checkbox-group,
.wppes-grid-options {
    display: grid;
    gap: 15px;
}

.wppes-grid-options {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.wppes-option-card {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    font-weight: 500;
}

.wppes-option-card:hover {
    border-color: #b8daff;
    background-color: #f8fbff;
    transform: translateY(-2px);
}

.wppes-option-card:has(input:checked) {
    border-color: #007bff;
    background-color: #f0f7ff;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.1);
}

.wppes-option-card input {
    margin-right: 15px;
    transform: scale(1.2);
    accent-color: #007bff;
}

/* Range Sliders - CRITICAL FIX */
.wppes-range-container {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #eee;
}

input[type=range] {
    width: 100%;
    margin: 15px 0;
    -webkit-appearance: none;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #dee2e6;
    border-radius: 4px;
}

input[type=range]::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
}

.wppes-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 2px;
}

.wppes-range-labels span {
    text-align: center;
    font-weight: 700;
    color: #555;
    font-size: 1.1rem;
    position: relative;
    width: 40px;
    /* Ensure width for centering */
}

.wppes-range-labels span small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #888;
    margin-top: 4px;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Alert Box */
.wppes-alert-box {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

/* Textarea & Select */
.wppes-textarea,
.wppes-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.wppes-textarea:focus,
.wppes-select:focus {
    border-color: #007bff;
    outline: none;
}

/* Buttons */
.wppes-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wppes-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.wppes-btn-prev {
    background-color: #e9ecef;
    color: #495057;
}

.wppes-btn-prev:hover {
    background-color: #dee2e6;
    color: #212529;
}

.wppes-btn-next,
.wppes-btn-submit {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.wppes-btn-next:hover,
.wppes-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Success Message */
.wppes-success-message {
    text-align: center;
    padding: 60px 20px;
}

/* Dashboard Styles */
.wppes-dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Inter', system-ui, sans-serif;
    color: #444;
}

/* Header */
.wppes-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.wppes-dashboard-title {
    margin: 0;
    font-size: 1.8rem;
    color: #2c3e50;
}

.wppes-total-badge {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.wppes-total-badge .count {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
}

.wppes-total-badge .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Grid Layouts */
.wppes-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wppes-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Cards */
/* Cards */
.wppes-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.wppes-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.wppes-card h3 {
    text-align: center;
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.wppes-card h4 {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 10px;
}

/* Chart Wrapper - Fix for Huge Charts */
.chart-wrapper {
    position: relative;
    height: 250px;
    width: 100%;
    margin: 0 auto;
}

.small-card {
    padding: 10px;
}

.small-card canvas {
    max-height: 120px !important;
}

/* Progress Banner */
.wppes-banner-card {
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    height: 30px;
    position: relative;
    overflow: hidden;
    margin-top: 15px;
}

.progress-fill {
    background: #1cc88a;
    height: 100%;
    border-radius: 20px;
    transition: width 1s ease-out;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Delays */
.delay-1 {
    animation-delay: 0.1s;
}

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

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

.delay-7 {
    animation-delay: 0.7s;
}

.delay-8 {
    animation-delay: 0.8s;
}

.delay-9 {
    animation-delay: 0.9s;
}

.delay-10 {
    animation-delay: 1.0s;
}

.delay-11 {
    animation-delay: 1.1s;
}

.delay-12 {
    animation-delay: 1.2s;
}

.delay-13 {
    animation-delay: 1.3s;
}

.delay-14 {
    animation-delay: 1.4s;
}

/* Table */
.wppes-dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.wppes-dashboard-table th {
    background: #f8f9fa;
    text-align: left;
    padding: 12px;
    font-weight: 600;
    color: #555;
}

.wppes-dashboard-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

/* Responsive */
@media(max-width: 768px) {

    .wppes-grid-3,
    .wppes-grid-2 {
        grid-template-columns: 1fr;
    }

    .wppes-dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}