/* Wellbeing Wheel Plugin Styles - Enhanced with Notes */

.wellbeing-wheel-container {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    width: 100%;
    margin: 2rem 0;
}

.wellbeing-wheel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background: #f8f9fa;
    border-radius: 12px;
    font-size: 1.1rem;
    color: #6b7280;
}

/* Enhanced button styles */
.wellbeing-wheel-container button {
    transition: all 0.2s ease;
    font-family: inherit;
}

.wellbeing-wheel-container button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.wellbeing-wheel-container button:active {
    transform: translateY(0);
}

.wellbeing-wheel-container button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.wellbeing-wheel-container button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Download button specific styles */
#download-pdf-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

#download-pdf-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

#download-text-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

#download-text-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}

/* Notes textarea styling */
.wellbeing-wheel-container textarea {
    transition: all 0.2s ease;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.wellbeing-wheel-container textarea:focus {
    outline: none;
    border-color: var(--dimension-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wellbeing-wheel-container textarea:hover {
    border-color: #9ca3af;
}

.wellbeing-wheel-container textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Dimension control enhancements */
.dimension-control {
    transition: all 0.2s ease;
    position: relative;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
    cursor: pointer;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.dimension-control p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    margin: 0;
    line-height: 1.4;
}

.dimension-control .description-text {
    max-width: calc(100% - 140px); /* Account for button area */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.dimension-control:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dimension-control.selected {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dimension-control:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Progress bar enhancements */
.wellbeing-wheel-container .progress-bar {
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wellbeing-wheel-container .progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}

.wellbeing-wheel-container .progress-bar.updated::before {
    left: 100%;
}

/* SVG interaction enhancements */
.wellbeing-wheel-container svg {
    transition: all 0.2s ease;
}

.wellbeing-wheel-container svg path {
    transition: all 0.2s ease;
}

.wellbeing-wheel-container svg path:hover {
    filter: brightness(1.1);
    stroke-width: 3;
    cursor: pointer;
}

/* Card styling enhancements */
.wellbeing-wheel-container div[style*="background: white"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wellbeing-wheel-container div[style*="background: white"]:hover {
    transform: translateY(-1px);
}

/* Loading and progress indicators */
.wellbeing-wheel-loading::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Download progress overlay */
.download-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    text-align: center;
    min-width: 250px;
}

.download-progress::after {
    content: "";
    width: 30px;
    height: 30px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 1rem auto 0 auto;
    display: block;
}

/* Success notification */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 9999;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive design */
@media (max-width: 768px) {
    .wellbeing-wheel-container #wellbeing-main {
        padding: 1rem !important;
    }
    
    .wellbeing-wheel-container h1 {
        font-size: 1.5rem !important;
    }
    
    .wellbeing-wheel-container h2 {
        font-size: 1.25rem !important;
    }
    
    .wellbeing-wheel-container svg {
        width: 300px !important;
        height: 300px !important;
    }
    
    .wellbeing-wheel-container .dimension-control {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .wellbeing-wheel-container .dimension-control > div:last-child {
        margin-left: 0 !important;
        margin-top: 1rem !important;
        align-self: flex-end !important;
    }
    
    /* Download buttons on mobile */
    .wellbeing-wheel-container #download-pdf-btn,
    .wellbeing-wheel-container #download-text-btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
        font-size: 0.875rem;
        padding: 0.875rem 1rem;
    }
    
    /* Notes textarea on mobile */
    .wellbeing-wheel-container textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 80px;
    }
    
    /* Summary grid on mobile */
    .wellbeing-wheel-container div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    .wellbeing-wheel-container svg {
        width: 250px !important;
        height: 250px !important;
    }
    
    .wellbeing-wheel-container .dimension-control {
        padding: 1rem !important;
    }
    
    .wellbeing-wheel-container textarea {
        min-height: 70px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wellbeing-wheel-container {
        border: 2px solid #000;
    }
    
    .wellbeing-wheel-container button {
        border: 2px solid #000 !important;
    }
    
    .wellbeing-wheel-container svg path {
        stroke: #000 !important;
        stroke-width: 3 !important;
    }
    
    .wellbeing-wheel-container textarea {
        border: 2px solid #000 !important;
    }
}

/* Print styles for PDF generation */
@media print {
    .wellbeing-wheel-container {
        background: white !important;
        color: black !important;
    }
    
    .wellbeing-wheel-container button {
        display: none !important;
    }
    
    .wellbeing-wheel-container textarea {
        border: 1px solid #ccc !important;
        background: white !important;
    }
    
    .wellbeing-wheel-container [style*="background: linear-gradient"] {
        background: white !important;
    }
    
    .wellbeing-wheel-container svg {
        max-width: 100%;
        height: auto;
    }
}

/* Animation for score updates */
@keyframes scoreUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.score-updated {
    animation: scoreUpdate 0.3s ease;
}

/* Enhanced focus states for accessibility */
.wellbeing-wheel-container .dimension-control:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.wellbeing-wheel-container label {
    cursor: pointer;
}

/* Error and success states */
.wellbeing-wheel-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
}

.wellbeing-wheel-success {
    background: #f0fdf4;
    border: 1