.wp-scribe-survey {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.survey-header {
    text-align: center;
    margin-bottom: 2rem;
}

.survey-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.survey-question {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    line-height: 1.4;
}

.survey-form {
    margin-bottom: 1rem;
}

.survey-options {
    margin-bottom: 2rem;
}

.survey-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.survey-option:hover {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

.survey-option.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.survey-option.focused {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.survey-option input[type="radio"],
.survey-option input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.survey-option input[type="radio"] {
    accent-color: #3b82f6;
}

.survey-option input[type="checkbox"] {
    accent-color: #3b82f6;
}

.survey-option label {
    flex: 1;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
}

.survey-submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.survey-submit-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.survey-submit-btn:active {
    transform: translateY(0);
}

.survey-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.survey-message {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    margin-top: 1rem;
}

.survey-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.survey-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive design */
@media (max-width: 768px) {
    .wp-scribe-survey {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .survey-title {
        font-size: 1.5rem;
    }
    
    .survey-question {
        font-size: 1.125rem;
    }
    
    .survey-option {
        padding: 0.5rem;
    }
    
    .survey-submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animation for option selection */
.survey-option {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Custom radio button styling */
.survey-option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.survey-option input[type="radio"]:checked {
    border-color: #3b82f6;
    background: #3b82f6;
}

.survey-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Custom checkbox styling */
.survey-option input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.survey-option input[type="checkbox"]:checked {
    border-color: #3b82f6;
    background: #3b82f6;
}

.survey-option input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

/* Focus styles for accessibility */
.survey-option input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Loading state */
.survey-submit-btn.loading {
    position: relative;
    color: transparent;
}

.survey-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Survey Results Styles */
.survey-results {
    display: none;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px solid #3b82f6;
}

.results-header h4 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

.results-total {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.results-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-option {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-label {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.result-bar-container {
    width: 100%;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.result-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width 0.6s ease-out;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.result-stats {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: right;
    font-weight: 500;
}

/* Animation for results appearing */
@keyframes resultsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.survey-results {
    animation: resultsFadeIn 0.4s ease-out;
}
