/*
    ibps-test-style.css
    Custom styles for the IBPS test plugin.
    These styles complement the Tailwind CSS classes used in the HTML.
*/

/* Inter Font (for a clean, modern look) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

/* Custom modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Mobile question palette scrollbar hiding */
.question-palette-mobile {
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.question-palette-mobile::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Review Page Styling */
.review-option {
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
}

.review-option.correct {
    background-color: #d1fae5; /* Green for correct answer */
    color: #065f46;
}

.review-option.incorrect {
    background-color: #fee2e2; /* Red for incorrect answer */
    color: #991b1b;
}

.review-option.selected {
    border: 2px solid #3b82f6;
}

.review-option.correct.selected {
    border: 2px solid #10b981;
}

.review-icon {
    font-weight: bold;
    margin-right: 10px;
}

.solution-box {
    background-color: #e0f2fe;
    border-left-color: #3b82f6;
    color: #0c4a6e;
    padding: 1rem;
    border-left-width: 4px;
    border-radius: 0.375rem;
    margin-top: 1rem;
}

/* General admin styling for a cleaner look */
.ibps-admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ibps-admin-container h1,
.ibps-admin-container h2,
.ibps-admin-container h3 {
    color: #1f2937;
}

.ibps-section {
    margin-bottom: 24px;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}

table td, table th {
    border: none !important; /* Remove default WP borders */
}

table tbody tr:hover {
    background-color: #f9fafb;
}

.wp-editor-wrap {
    border: 1px solid #ccc;
    border-radius: 6px;
}

/* Rich editor styling */
.rich-editor {
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* New Subject Modal */
#new-subject-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

#new-subject-modal .modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}
