/* =================================================================
   "STUDENT NOTES" BUTONUNU ZORLA YENİDEN KONUMLANDIRMA
   Bu kural, diğer eklentinin stilini ezerek çakışmayı önler.
================================================================= */
#sn-floating-button {
    /* Konumunu bizim butonumuzun 80px altına sabitliyoruz */
    top: calc(50% + 80px) !important;
    transform: translateY(-50%) !important;
}


/* =================================================================
   YENİ MİNİMALİST "SHOW ANSWER" BUTONU
================================================================= */
#floating-answer-btn {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 9998;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: 52px;
    height: 52px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

#floating-answer-btn:hover {
    border-color: #0073aa;
    transform: translateY(-50%) scale(1.05);
}

#floating-answer-btn img {
    width: 100%;
    height: 100%;
}


/* =================================================================
   POPUP & CEVAP STİLLERİ (YENİ RESPONSIVE GÜNCELLEME)
================================================================= */
.masterstudy-course-player-answer.qav-correct-answer { background-color: #d4edda !important; border-left: 5px solid #28a745; }
.masterstudy-course-player-answer.qav-incorrect-answer { background-color: #f8d7da !important; border-left: 5px solid #dc3545; }

/* Popup'ın genel çerçevesi */
#answer-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px; /* Kenar boşluğu */
}

/* Arka plan karartması */
#answer-popup-wrapper .popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

/* Popup kutusunun kendisi */
#answer-popup-wrapper .popup-content {
    position: relative;
    background: #fff;
    padding: 0; /* İç boşluğu alt elemanlara devrettik */
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 100001;
    display: flex; /* <-- YENİ: Dikey hizalama için Flexbox */
    flex-direction: column; /* <-- YENİ: Elemanları dikey diz */
    max-height: 90vh; /* <-- YENİ: Yüksekliği ekranın %90'ı ile sınırla */
    overflow: hidden; /* Dışarı taşmaları engelle */
}

/* Popup başlığı */
#answer-popup-wrapper .popup-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* <-- YENİ: Başlığın küçülmesini engelle */
}

#answer-popup-wrapper .popup-header h4 { margin: 0; font-size: 1.2em; }
#answer-popup-wrapper .popup-close { font-size: 2em; font-weight: bold; line-height: 1; cursor: pointer; color: #888; }
#answer-popup-wrapper .popup-close:hover { color: #000; }

/* Popup içeriği (açıklama metni) */
#answer-popup-wrapper .popup-body {
    padding: 20px 25px;
    flex-grow: 1; /* <-- YENİ: Mevcut tüm boşluğu doldur */
    overflow-y: auto; /* <-- YENİ: İçerik sığmazsa dikey scrollbar göster */
}

/* Bonus: Modern ve ince scrollbar stili */
#answer-popup-wrapper .popup-body::-webkit-scrollbar {
    width: 8px;
}
#answer-popup-wrapper .popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
#answer-popup-wrapper .popup-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
#answer-popup-wrapper .popup-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


/* =================================================================
   MOBİL UYUMLULUK (RESPONSIVE)
================================================================= */
@media (max-width: 768px) {
    #floating-answer-btn,
    #sn-floating-button {
        transform: none !important;
        right: 15px !important;
    }

    /* Bizim butonumuz */
    #floating-answer-btn {
        top: auto;
        bottom: 95px;
        width: 56px;
        height: 56px;
    }
    
    /* Not butonu */
    #sn-floating-button {
       top: auto !important;
       bottom: 20px !important;
    }

    /* Mobilde popup'ın daha fazla yer kaplamasını sağla */
    #answer-popup-wrapper {
        padding: 10px;
        align-items: flex-end; /* Popup'ı aşağıya yasla */
    }
    #answer-popup-wrapper .popup-content {
        max-height: 75vh; /* Mobilde yüksekliği biraz daha kısıtla */
        margin-bottom: 10px;
    }
}