/* ============================================
   aoeowl.css – AOE Owl im Pokémon-Schwebestil
   Farben wie Original: braun/beige/gold
   ============================================ */

.aoeowl-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Arial Rounded MT Bold', 'Montserrat', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* ----- SPRECHBLASE ----- */
.aoeowl-bubble {
    background: #FFFACD;
    border: 4px solid #FFD700;
    border-radius: 25px;
    padding: 14px 20px;
    margin-bottom: 10px;
    max-width: 250px;
    position: relative;
    animation: bubblePop 0.3s ease-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.aoeowl-bubble::after {
    content: "";
    position: absolute;
    bottom: -12px;
    right: 30px;
    border: 12px solid transparent;
    border-top-color: #FFD700;
}

.aoeowl-bubble::before {
    content: "";
    position: absolute;
    bottom: -8px;
    right: 30px;
    border: 12px solid transparent;
    border-top-color: #FFFACD;
    z-index: 2;
}

.aoeowl-bubble-text {
    color: #2F4F4F;
    font-size: 1em;
    line-height: 1.4;
    text-align: center;
}

@keyframes bubblePop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ----- MINI-EULE (SCHWEBEND) ----- */
.aoeowl-widget-mini {
    width: 120px;
    height: 120px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

.aoeowl-widget-mini:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

/* Ohren */
.aoeowl-ears {
    position: absolute;
    top: -12px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 40px;
    z-index: 3;
}

.aoeowl-ear {
    width: 20px;
    height: 35px;
    background: #8B4513;
    border-radius: 50% 50% 0 0;
    transform: rotate(-8deg);
}

.aoeowl-ear:last-child {
    transform: rotate(8deg);
}

/* Körper */
.aoeowl-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #DEB887, #F4A460);
    border-radius: 50%;
    border: 6px solid #8B4513;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -8px 15px rgba(0,0,0,0.1);
}

/* Augen */
.aoeowl-eyes {
    position: absolute;
    top: 35px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.aoeowl-eye {
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    border: 3px solid #8B4513;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.2);
}

.aoeowl-pupil {
    width: 14px;
    height: 14px;
    background: #2F4F4F;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
}

.aoeowl-eyelid {
    position: absolute;
    top: -100%;
    width: 100%;
    height: 100%;
    background: #DEB887;
    transition: top 0.15s ease;
    z-index: 5;
}

/* Schnabel */
.aoeowl-beak {
    width: 30px;
    height: 22px;
    background: #FFD700;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.2s ease;
}

/* Federn */
.aoeowl-feathers {
    position: absolute;
    bottom: 12px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 50px;
}

.aoeowl-feather {
    width: 30px;
    height: 15px;
    background: #D2B48C;
    border-radius: 0 0 50% 50%;
    opacity: 0.7;
}

/* ----- CHAT-ANSICHT (EXPANDED) ----- */
.aoeowl-widget-expanded-content {
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid #8B4513;
}

.expanded .aoeowl-widget-mini,
.expanded .aoeowl-bubble {
    display: none !important;
}

.expanded .aoeowl-widget-expanded-content {
    display: flex;
}

/* Header */
.aoeowl-widget-header {
    background: linear-gradient(135deg, #8B4513, #5D3A1A);
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aoeowl-widget-title {
    font-size: 1.3em;
    font-weight: bold;
    letter-spacing: 1px;
}

.aoeowl-widget-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.aoeowl-widget-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Chat-Box */
.aoeowl-widget-chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #FDF8F0;
}

.aoeowl-message {
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 12px;
    max-width: 85%;
    word-wrap: break-word;
    animation: messageSlide 0.3s;
    line-height: 1.5;
}

@keyframes messageSlide {
    0% { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.aoeowl-message.user {
    background: #8B4513;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.aoeowl-message.owl {
    background: #FFF9C4;
    color: #5D4037;
    margin-right: auto;
    border-bottom-left-radius: 5px;
    border: 1px solid #FFD700;
}

/* Input-Bereich */
.aoeowl-widget-input-area {
    padding: 18px 20px;
    background: white;
    border-top: 2px solid #DEB887;
    display: flex;
    gap: 12px;
}

.aoeowl-widget-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #DEB887;
    border-radius: 30px;
    font-size: 1em;
    outline: none;
    transition: 0.3s;
}

.aoeowl-widget-input:focus {
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139,69,19,0.1);
}

.aoeowl-widget-send {
    width: 52px;
    height: 52px;
    background: #8B4513;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.3em;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aoeowl-widget-send:hover {
    background: #5D3A1A;
    transform: scale(1.1);
}

/* Emotionen & Animationen */
.aoeowl-sleeping {
    animation: sleepFloat 4s ease-in-out infinite !important;
    filter: brightness(0.9);
}

@keyframes sleepFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.aoeowl-excited {
    animation: excitedFloat 0.6s ease-in-out infinite !important;
}

@keyframes excitedFloat {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(8deg); }
}

.aoeowl-thinking {
    animation: thinking 1s ease-in-out infinite !important;
}

@keyframes thinking {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

/* Mobile Anpassung */
@media (max-width: 480px) {
    .aoeowl-widget-container {
        bottom: 20px;
        right: 20px;
    }
    .aoeowl-widget-mini {
        width: 100px;
        height: 100px;
    }
    .aoeowl-widget-expanded-content {
        width: calc(100vw - 40px);
        height: 80vh;
    }
}
