@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom styles */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
}
html {
    scroll-behavior: smooth;
}

/* Flip animation for grade change */
.flip-animation {
    animation: flip360 0.8s ease-in-out;
}

@keyframes flip360 {
    0% {
        transform: rotateY(0deg);
        opacity: 1;
    }
    25% {
        transform: rotateY(90deg);
        opacity: 0.7;
    }
    50% {
        transform: rotateY(180deg);
        opacity: 0.3;
    }
    75% {
        transform: rotateY(270deg);
        opacity: 0.7;
    }
    100% {
        transform: rotateY(360deg);
        opacity: 1;
    }
}

/* Chatbot Button */
#chatbot-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 1000000 !important;
    width: 60px !important;
    height: 60px !important;
    background-color: #136dec !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(19, 109, 236, 0.4) !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.3s ease !important;
    -webkit-tap-highlight-color: transparent !important;
}

#chatbot-button img {
    width: 32px !important;
    height: 32px !important;
    display: block !important;
}

/* Chatbot Modal */
#chatbot-modal {
    display: none;
}

#chatbot-modal > div {
    background-color: white !important;
    border-radius: 16px !important;
    max-width: 400px !important;
    width: 90vw !important;
    height: 600px !important;
    max-height: 80vh !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    position: fixed !important;
    bottom: 100px !important;
    right: 20px !important;
    z-index: 1000002 !important;
    -webkit-tap-highlight-color: transparent !important;
}

#chatbot-modal .modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

#chatbot-modal .modal-header img {
    width: 32px !important;
    height: 32px !important;
}

#chatbot-modal .modal-header h3 {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #1e293b !important;
    margin: 0 !important;
}

#chatbot-modal .modal-header p {
    font-size: 14px !important;
    color: #64748b !important;
    margin: 0 !important;
}

#close-chatbot {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    font-size: 20px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000003 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
}

#chatbot-iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 0 0 16px 16px !important;
}

/* Modal base styles */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000001 !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-tap-highlight-color: transparent !important;
}

.modal.hidden {
    display: none !important;
}

#quiz-modal > div {
    /* Removed fixed positioning - will use parent flexbox centering */
}