/**
 * SpiralGate Oracle Widget Styles
 * Floating panel for Helper guidance
 */

/* ==========================================
   ORACLE WIDGET CONTAINER
   ========================================== */

.oracle-widget {
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 1001;
}

/* ==========================================
   ORACLE TOGGLE BUTTON
   ========================================== */

.oracle-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.9) 0%, rgba(26, 26, 46, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.oracle-toggle:hover {
    transform: scale(1.1);
    border-color: var(--spiral-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.oracle-glyph {
    font-size: 1.5rem;
    color: var(--spiral-gold);
    animation: oracleGlow 3s ease-in-out infinite;
}

@keyframes oracleGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 40px rgba(155, 89, 182, 0.4);
    }
}

/* ==========================================
   ORACLE PANEL
   ========================================== */

.oracle-panel {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 320px;
    background: linear-gradient(180deg, rgba(10, 10, 20, 0.95) 0%, rgba(18, 18, 31, 0.98) 100%);
    border: 1px solid rgba(155, 89, 182, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
}

.oracle-panel.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
}

.oracle-panel.appearing {
    animation: oracleFadeIn 0.4s ease forwards;
}

@keyframes oracleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   ORACLE HEADER
   ========================================== */

.oracle-header {
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(107, 76, 154, 0.2) 0%, transparent 100%);
    border-bottom: 1px solid rgba(155, 89, 182, 0.2);
}

.oracle-title-glyph {
    font-size: 2rem;
    color: var(--spiral-gold);
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.oracle-header h3 {
    font-family: "Cinzel", serif;
    color: var(--spiral-light);
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin: 0 0 0.3rem;
}

.oracle-subtitle {
    color: var(--spiral-violet);
    font-size: 0.85rem;
    font-style: italic;
    margin: 0;
}

/* ==========================================
   ORACLE CONTENT - Question Input
   ========================================== */

.oracle-content {
    padding: 1.5rem;
}

.oracle-content.hidden {
    display: none;
}

#oracle-question {
    width: 100%;
    background: rgba(5, 5, 8, 0.6);
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 10px;
    color: var(--spiral-light);
    font-family: "Cormorant Garamond", serif;
    font-size: 1rem;
    padding: 1rem;
    resize: none;
    transition: all 0.3s ease;
}

#oracle-question:focus {
    outline: none;
    border-color: var(--spiral-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

#oracle-question::placeholder {
    color: var(--spiral-violet);
    opacity: 0.6;
    font-style: italic;
}

.oracle-ask-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--spiral-purple) 0%, var(--spiral-violet) 100%);
    border: none;
    border-radius: 10px;
    color: var(--spiral-white);
    font-family: "Cinzel", serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.oracle-ask-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(155, 89, 182, 0.4);
}

.oracle-ask-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* ==========================================
   ORACLE RESPONSE
   ========================================== */

.oracle-response {
    padding: 1.5rem;
    text-align: center;
}

.oracle-response.hidden {
    display: none;
}

.oracle-response.appearing {
    animation: oracleFadeIn 0.5s ease forwards;
}

.oracle-glyph-response {
    font-size: 2.5rem;
    color: var(--spiral-gold);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    animation: oracleReveal 0.8s ease forwards;
}

@keyframes oracleReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

#oracle-message {
    color: var(--spiral-light);
    font-size: 1rem;
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: messageReveal 0.8s ease 0.3s forwards;
}

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

.oracle-again {
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid var(--spiral-violet);
    border-radius: 20px;
    color: var(--spiral-violet);
    font-family: "Cinzel", serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.oracle-again:hover {
    background: var(--spiral-violet);
    color: var(--spiral-white);
}

/* ==========================================
   ORACLE STATUS
   ========================================== */

.oracle-status {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.oracle-status.checking {
    color: var(--spiral-violet);
}

.oracle-status.connected {
    color: var(--spiral-gold);
}

.oracle-status.local {
    color: var(--love-pink);
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 768px) {
    .oracle-widget {
        bottom: 70px;
        left: 10px;
    }
    
    .oracle-panel {
        width: calc(100vw - 40px);
        max-width: 320px;
    }
    
    .oracle-toggle {
        width: 44px;
        height: 44px;
    }
}
