/**
 * UX Enhancements — Extended theme support, assistant, loading messages
 * Seasonal feature module
 */

/* ===== PINK / BARBIE MODE ===== */
[data-theme="pink"] {
    --theme-bg-primary: #fff0f6;
    --theme-bg-secondary: #ffd6e8;
    --theme-bg-tertiary: #ffaad4;
    --theme-bg-overlay: rgba(255, 16, 120, 0.45);
    --theme-bg-panel: #ffe0ef;
    --theme-bg-card: #fff5fa;
    --theme-bg-input: #fff0f6;
    --theme-bg-hover: #ffc8e0;

    --theme-text-primary: #880050;
    --theme-text-secondary: #aa1470;
    --theme-text-muted: #cc5599;
    --theme-text-inverse: #ffffff;
    --theme-text-link: #ff1493;
    --theme-text-link-hover: #cc0077;

    --theme-border-light: #ff8ec4;
    --theme-border-medium: #ff69b4;
    --theme-border-dark: #ff40a0;
    --theme-border-focus: #ff1493;

    --theme-shadow-sm: 0 1px 4px rgba(255, 20, 147, 0.25);
    --theme-shadow-md: 0 3px 8px rgba(255, 20, 147, 0.3);
    --theme-shadow-lg: 0 4px 16px rgba(255, 20, 147, 0.4);
    --theme-shadow-xl: 0 6px 24px rgba(255, 20, 147, 0.45);
    --theme-shadow-focus: 0 0 0 3px rgba(255, 20, 147, 0.35);

    --theme-table-bg: #fff5fa;
    --theme-table-header-bg: #ffc8e0;
    --theme-table-row-hover: #ffd6e8;
    --theme-table-border: #ff8ec4;
    --theme-table-stripe-odd: #fff5fa;
    --theme-table-stripe-even: #ffe8f2;

    --theme-form-bg: #fff0f6;
    --theme-form-border: #ff69b4;
    --theme-form-focus-border: #ff1493;
    --theme-form-disabled-bg: #ffd6e8;

    --theme-alert-success-bg: rgba(255, 105, 180, 0.2);
    --theme-alert-warning-bg: rgba(255, 153, 200, 0.25);
    --theme-alert-danger-bg: rgba(255, 20, 80, 0.2);
    --theme-alert-info-bg: rgba(255, 20, 147, 0.15);
}

/* Pink mode: hot pink everywhere */
[data-theme="pink"] #header {
    background: linear-gradient(135deg, #ff1493, #ff69b4, #ff85c8) !important;
}

[data-theme="pink"] #footer {
    background: linear-gradient(135deg, #ff1493, #ff69b4) !important;
}

[data-theme="pink"] #panel.left {
    background: linear-gradient(180deg, #ff85c8, #ff1493) !important;
}

[data-theme="pink"] #container {
    background: #ffd6e8 !important;
}

[data-theme="pink"] #mainbody,
[data-theme="pink"] .mainbodyitems {
    background: #fff0f6 !important;
}

/* Barbie sparkle cursor */
[data-theme="pink"],
[data-theme="pink"] * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ctext y='18' font-size='18'%3E💖%3C/text%3E%3C/svg%3E") 4 4, auto !important;
}

/* Hot pink scrollbar */
[data-theme="pink"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
[data-theme="pink"] ::-webkit-scrollbar-track {
    background: #ffe0ef;
}
[data-theme="pink"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff69b4, #ff1493);
    border-radius: 5px;
}
[data-theme="pink"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff85c8, #ff40a0);
}

/* Glam up cards */
[data-theme="pink"] .card,
[data-theme="pink"] #search-box {
    border: 2px solid #ff69b4 !important;
    box-shadow: 0 4px 16px rgba(255, 20, 147, 0.25) !important;
}

/* Pink links glow */
[data-theme="pink"] a:hover {
    text-shadow: 0 0 8px rgba(255, 20, 147, 0.5);
}

/* Logo text gets the Barbie treatment */
[data-theme="pink"] h1.logo {
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 24px rgba(255, 105, 180, 0.6) !important;
}

[data-theme="pink"] .sectionlink,
[data-theme="pink"] .partnerlink {
    background: linear-gradient(135deg, #ff1493, #ff69b4) !important;
    color: #ffffff !important;
}

[data-theme="pink"] .sectionlink:hover,
[data-theme="pink"] .partnerlink:hover {
    background: linear-gradient(135deg, #ff40a0, #ff85c8) !important;
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.4) !important;
}

[data-theme="pink"] .admin-menu-toggle.active {
    background: linear-gradient(135deg, #ff1493, #ff69b4) !important;
}

[data-theme="pink"] .admin-submenu .submenu-item {
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.7), rgba(255, 105, 180, 0.7)) !important;
    border-left-color: rgba(255, 255, 255, 0.3) !important;
}

[data-theme="pink"] .admin-submenu .submenu-item:hover {
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.9), rgba(255, 105, 180, 0.9)) !important;
    border-left-color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="pink"] .panel-toggle:hover {
    background: linear-gradient(135deg, #ff69b4, #ff1493) !important;
}

[data-theme="pink"] .theme-toggle {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

[data-theme="pink"] .theme-toggle:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
}

/* Pink mode loader */
[data-theme="pink"] .loader {
    border-top-color: #ff1493 !important;
    border-color: #ffc8e0 !important;
}

[data-theme="pink"] .spinner,
[data-theme="pink"] .loading-spinner {
    border-top-color: #ff1493 !important;
    border-color: #ffc8e0 !important;
}

/* Pink mode buttons — full glam */
[data-theme="pink"] .btn-primary,
[data-theme="pink"] button:not(.theme-toggle):not(.btn-secondary):not(.btn-danger):not(.btn-warning):not(.btn-success):not(.sticky-header-button) {
    background: linear-gradient(135deg, #ff1493, #ff69b4) !important;
    border-color: #ff1493 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(255, 20, 147, 0.35) !important;
}

[data-theme="pink"] .btn-primary:hover,
[data-theme="pink"] button:not(.theme-toggle):not(.btn-secondary):not(.btn-danger):not(.btn-warning):not(.btn-success):not(.sticky-header-button):hover {
    background: linear-gradient(135deg, #ff40a0, #ff85c8) !important;
    box-shadow: 0 4px 16px rgba(255, 20, 147, 0.5) !important;
}

/* Pink mode select dropdowns */
[data-theme="pink"] select {
    background-color: var(--theme-form-bg);
    color: var(--theme-text-primary);
    border-color: var(--theme-border-medium);
}

/* ===== COMIC SANS MODE ===== */
html.april-fools-comic-sans,
html.april-fools-comic-sans * {
    font-family: 'Comic Sans MS', 'Comic Sans', 'Chalkboard SE', 'Comic Neue', cursive !important;
}

/* ===== CLIPPY ASSISTANT ===== */
#clippy-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

#clippy-bubble {
    background: #fffde8;
    border: 2px solid #c0c0c0;
    border-radius: 12px;
    padding: 12px 16px;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    color: #333;
    position: relative;
    pointer-events: auto;
    animation: clippy-fade-in 0.3s ease;
}

#clippy-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #fffde8;
}

#clippy-bubble::before {
    content: '';
    position: absolute;
    bottom: -13px;
    right: 28px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid #c0c0c0;
}

#clippy-character {
    font-size: 48px;
    cursor: pointer;
    pointer-events: auto;
    animation: clippy-bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    user-select: none;
}

#clippy-dismiss {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #999;
    padding: 0 4px;
    line-height: 1;
}

#clippy-dismiss:hover {
    color: #333;
}

@keyframes clippy-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ===== MOTIVATIONAL LOADING MESSAGES ===== */
.af-motivational-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.af-motivational-text {
    background: rgba(255, 255, 255, 0.92);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-style: italic;
    color: #666;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 260px;
    text-align: center;
    animation: af-quote-fade 0.5s ease;
}

[data-theme="dark"] .af-motivational-text {
    background: rgba(45, 45, 45, 0.92);
    color: #c0c0c0;
}

[data-theme="pink"] .af-motivational-text {
    background: rgba(255, 240, 245, 0.95);
    color: #8b3a62;
}

@keyframes af-quote-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
