/* Kids Wonder Assessment Plugin General Styles */
.kwa-assessment-wrapper,
.kwa-settings-wrapper,
.kwa-report-wrapper {
    background-color: #fcfcfc;
    border: 1px solid #ddd;
    padding: 15px 25px 25px;
    border-radius: 8px;
    font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 960px;
    margin: 10px auto;
    box-shadow: 0 1px 2px rgba(0,0,0,0.07);
}

/* Form Styles */
.kwa-form-header {
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.kwa-form-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}
.kwa-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}
.kwa-form-group {
    display: flex;
    flex-direction: column;
}
.kwa-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}
.kwa-form-group input[type="date"],
.kwa-form-group input[type="text"],
.kwa-form-group select,
.kwa-form-group textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
}
.kwa-submit-btn,
.kwa-search-btn {
    background-color: #0073aa;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s;
}
.kwa-submit-btn:hover,
.kwa-search-btn:hover {
    background-color: #005a87;
}

/* Student Name Display Styles */
.kwa-name-display {
    margin-top: 3px;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}
.kwa-name-display.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.kwa-name-display.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}


/* Skills Display Styles */
.kwa-skills-placeholder {
    text-align: center;
    color: #888;
    padding: 40px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}
.kwa-domain-group {
    margin-bottom: 10px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e5e5e5;
}
.kwa-domain-title {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
    font-size: 20px;
}
.kwa-skills-table {
    width: 100%;
    border-collapse: collapse;
}
.kwa-skills-table th, .kwa-skills-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.kwa-skills-table th {
    background-color: #F5F5F5;
    font-weight: 600;
}
.kwa-skills-table td:nth-child(1) { width: 45%; }
.kwa-skills-table td:nth-child(2) { width: 30%; }

/* --- NEW: Style for missing rating row --- */
.kwa-skills-table tr.missing-rating {
    background-color: #fffbe6 !important;
    border-left: 3px solid #ffc107;
}
.kwa-skills-table tr.missing-rating td {
    border-color: #ffc107;
}

.kwa-rating-group { display: flex; gap: 5px; flex-wrap: wrap; }
.kwa-rating-group label {
    cursor: pointer;
    padding: 5px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s;
}
.kwa-rating-group input[type="radio"] { display: none; }
.kwa-rating-group input[type="radio"]:checked + span,
.kwa-rating-group label:has(input:checked) {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Notices */
.kwa-notice {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    text-align: center;
}
.kwa-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.kwa-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Settings Page Styles */
.kwa-settings-wrapper .nav-tab-wrapper {
    margin-bottom: 0;
    border-bottom: 1px solid #ccc;
}

.kwa-settings-wrapper .nav-tab {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none !important;
    border: 1px solid #ccc;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    margin-right: 5px;
    position: relative;
    top: 1px;
}

.kwa-settings-wrapper .nav-tab:visited {
    color: #333;
}

.kwa-settings-wrapper .nav-tab:hover {
    background-color: #e0e0e0;
    color: #000;
}

.kwa-settings-wrapper .nav-tab-active,
.kwa-settings-wrapper .nav-tab-active:visited {
    background-color: #fcfcfc;
    color: #0073aa;
    border-color: #ccc;
    border-bottom: 1px solid #fcfcfc;
    font-weight: bold;
}

.kwa-settings-wrapper .nav-tab-active:hover {
    background-color: #fcfcfc;
    color: #005a87;
}

.kwa-tab-content {
    border: 1px solid #ccc;
    border-top: none;
    padding: 20px;
    background: #fcfcfc;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
}

.kwa-settings-section {
    margin-bottom: 10px;
    background: #fff;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}
.kwa-settings-section h4 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.kwa-skills-checklist {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 15px;
    background: #fdfdfd;
}
/* ADDED: Makes each skill label a block and removes blank lines */
.kwa-skills-checklist label {
    display: block;
    margin-bottom: 8px;
}
.kwa-skills-checklist fieldset {
    margin-bottom: 10px;
    border: 1px solid #eee;
    padding: 10px;
}
.kwa-skills-checklist legend {
    font-weight: bold;
    padding: 0 5px;
}
.button.button-link-delete {
    color: white !important;
}
.button.button-link-delete:hover {
    color: yellow !important;
}

/* Report Page Styles */
.kwa-report-wrapper h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.kwa-report-search-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 10px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
}
.kwa-report-search-form .kwa-form-group {
    flex-grow: 1;
}
.kwa-report-search-form .kwa-search-btn {
    margin-top: 0;
    width: auto;
    flex-shrink: 0;
}
.kwa-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    padding: 5px 5px;
    border-radius: 6px;
    margin-bottom: 2px;
}
/* NEW: Flexbox container for student photo and info */
.kwa-student-info-with-photo {
    display: flex;
    align-items: center;
    gap: 15px;
}
.kwa-student-photo {
    height: 60px;
    width: 60px;
    border-radius: 50%; /* বৃত্তাকার */
    border: 2px solid #0073aa; /* সুন্দর ফ্রেম */
    object-fit: cover; /* ছবির অনুপাত ঠিক রাখে */
}
.kwa-report-student-info h4, .kwa-report-student-info p {
    margin: 0;
}
.kwa-print-btn {
    background-color: #2271b1;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.kwa-print-btn:hover {
    background-color: #1e639a;
}
.kwa-report-week-section {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}
.kwa-week-title {
    background-color: #0073aa;
    color: #fff;
    padding: 12px 15px;
    margin: 0;
    font-size: 1.2em;
}
.kwa-domain-header {
    background-color: #f0f0f0;
    padding: 5px 5px;
    margin: 0;
    font-size: 1.1em;
    border-bottom: 1px solid #e0e0e0;
}
.kwa-report-table {
    width: 100%;
    border-collapse: collapse;
}
.kwa-report-table th,
.kwa-report-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.kwa-report-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}
.kwa-report-table tbody tr:last-child td {
    border-bottom: none;
}

.kwa-edit-button {
    margin-right: 5px;
}

.kwa-edit-form-row td {
    background-color: #f9f9f9;
    padding: 20px !important;
    border-top: 2px solid #0073aa;
}

.kwa-edit-form-row h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #2c3e50;
}

.kwa-edit-form-row .form-table {
    margin-bottom: 10px;
}

.kwa-edit-form-row .button-primary {
    margin-right: 10px;
}

/* Print Styles */
@media print {
    @page {
        margin-top: 5mm;
        margin-right: 10mm;
        margin-bottom: 10mm;
        margin-left: 10mm;
    }    
	
	body * {
        visibility: hidden;
		margin: 0 !important;
        padding: 0 !important;
    }
    #kwa-printable-report, #kwa-printable-report * {
        visibility: visible;
    }
    #kwa-printable-report {
        width: 100%; 
        font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    }
    .kwa-report-header {
        display: flex; /* প্রিন্টের জন্য ফ্লেক্সবক্স লেআউট ঠিক করা হয়েছে */
        justify-content: center;
        align-items: center;
        gap: 15px;
        background: none;
        padding: 0;
        margin-bottom: 2px;
    }
    .kwa-student-info-with-photo {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    /* NEW: Zero out margins on h4 and p for print */
    .kwa-report-header h4,
    .kwa-report-header p {
        margin: 0 !important;
        padding: 0 !important;
    }
    .kwa-print-button-wrapper, .kwa-report-search-form {
        display: none !important;
    }
    .kwa-report-week-section {
        border: 1px solid #ccc !important;
        margin-bottom: 15px !important;
    }
    .kwa-report-table {
        font-size: 12px;
        font-family: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    }
    /* প্রিন্টের জন্য টেবিলের প্যাডিং কমানো হয়েছে যাতে প্রতিটি সারি আরও ছোট হয় */
    .kwa-report-table th, .kwa-report-table td {
        padding: 2px !important; 
    }
    .kwa-report-table thead {
        display: table-header-group;
    }
    /* hides action column from printing */
    .kwa-report-table th:last-child, .kwa-report-table td:last-child {
        display: none !important;
    }
    .kwa-edit-form-row { /* Hides edit form on print */
        display: none !important;
    }
    
    /* নতুন কালারফুল প্রিন্ট স্টাইল */
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    #kwa-printable-report {
        font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif; /* শিশুদের জন্য মজাদার ফন্ট */
    }
    .kwa-report-header h4,
    .kwa-report-header p {
        color: #ff69b4 !important; /* গোলাপি রঙ */
    }
    .kwa-student-photo {
        border: 2px solid #87ceeb !important; /* হালকা নীল ফ্রেম */
    }
    .kwa-report-week-section {
        border-color: #87ceeb !important; /* হালকা নীল */
        background-color: #e6f7ff !important; /* হালকা নীল ব্যাকগ্রাউন্ড */
    }
    .kwa-week-title {
        background-color: #2761F5 !important; /* হালকা নীল শিরোনাম ব্যাকগ্রাউন্ড */
        color: white !important;
        text-shadow: 1px 1px 2px #555; /* হালকা শ্যাডো */
    }
    .kwa-domain-header {
        background-color: #F5F5F5 !important; /* হালকা সবুজ */
        border-bottom: 1px solid #87ceeb !important;
    }
    .kwa-report-table th {
        background-color: #add8e6 !important; /* হালকা নীল */
        color: #333 !important;
    }
    .kwa-report-table tr:nth-child(even) td {
        background-color: #fffacd !important; /* হালকা হলুদ */
    }
    .kwa-report-table tr:nth-child(odd) td {
        background-color: #ffffff !important;
    }
    .kwa-report-table td {
        border-bottom-color: #b0c4de !important; /* হালকা ধূসর-নীল */
    }
    
    /* NEW: styles for theme title in print report */
    .kwa-week-theme {
        display: block !important;
        font-size: 10px;
        margin-top: 5px;
        font-weight: bold;
        color: #ff69b4 !important;
        background-color: #fffacd !important;
        border-radius: 3px;
        padding: 2px 5px;
        text-shadow: none;
        border: 1px solid #ff69b4;
    }

    /* NEW: Print-specific column widths for better layout */
    .kwa-report-table td:nth-child(1),
    .kwa-report-table th:nth-child(1) {
        width: 40% !important; /* দক্ষতার কলামের জন্য বড় প্রস্থ */
    }
    .kwa-report-table td:nth-child(2),
    .kwa-report-table th:nth-child(2) {
        width: 10% !important; /* রেটিং কলামের জন্য সমান প্রস্থ */
        text-align: center !important; /* রেটিং ভ্যালু সেন্টার অ্যালাইন করা হয়েছে */
    }
    .kwa-report-table td:nth-child(3),
    .kwa-report-table th:nth-child(3) {
        width: 50% !important; /* মন্তব্যের কলামের জন্য সমান প্রস্থ */
    }
}

/* --- New Styles for Skill Filters in Settings --- */
.kwa-skill-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
    padding: 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.kwa-skill-filters select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
}
