/* Arabic RTL Report Card Template Styles for HMIS */

/* RTL Layout Setup */
.rtl-layout {
    direction: rtl;
    text-align: right;
    font-family: 'Arial', 'Tahoma', 'Segoe UI', sans-serif;
}

/* HMIS Brand Colors */
:root {
    --hmis-primary: #6D1B72;
    --hmis-secondary: #36136D;
    --hmis-accent: #CF7088;
    --hmis-light: #f8f4f9;
    --hmis-dark: #2d0a30;
}

.rtl-layout * {
    direction: rtl;
}

/* A4 Page Setup for RTL */
.rtl-layout .result_body {
    width: 210mm;
    min-height: 297mm;
    padding: 5mm;
    margin: 20px auto;
    background: white;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    direction: rtl;
}

.rtl-layout .results-container {
    width: 100%;
    direction: rtl;
}

/* Banner and Header Styling for RTL */
.rtl-layout .hmis-banner img {
    width: 100%;
    height: auto;
}

.rtl-layout .school-address {
    font-size: 9.5pt !important;
    margin: 5mm 0;
    margin-top: -2px;
    margin-bottom: 10px;
    text-align: center;
    direction: rtl;
}

.rtl-layout hr {
    margin-top: -8px !important;
}

/* Table Styling for RTL */
.rtl-layout table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2mm;
    direction: rtl;
}

.rtl-layout td {
    border: 1px solid #000;
    padding: 2px;
    font-size: 9.5pt;
    line-height: 1.2;
    text-align: right;
}

/* Header Cells for RTL */
.rtl-layout td[style*="background-color"] {
    background: linear-gradient(135deg, var(--hmis-primary) 0%, var(--hmis-secondary) 100%) !important;
    color: #fff !important;
    font-size: 11pt;
    padding: 3px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(109, 27, 114, 0.3);
}

/* Student Details Table for RTL */
.rtl-layout .student-details-table {
    margin-bottom: 2mm;
    border-collapse: collapse;
    max-width: 100%;
    direction: rtl;
}

.rtl-layout .student-details-table td {
    padding: 2px 4px;
    height: auto;
    white-space: nowrap;
    max-width: 200px;
    line-height: 1.1;
    text-align: right;
}

/* Reduce width of column 1 for RTL */
.rtl-layout .student-details-table td:nth-child(1) {
    max-width: 1%;
    width: 1%;
    break-word: break-all;
}

/* Reduce width of column 5 for RTL */
.rtl-layout .student-details-table td:nth-child(5) {
    max-width: 1%;
    width: 1%;
    break-word: break-all;
}

/* Allow word wrapping for the last row in RTL */
.rtl-layout .student-details-table tr:last-child td {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
}

/* Student photo styling for RTL - fills the rowspan space */
.rtl-layout .student-details-table .student-photo,
.rtl-layout .student-details-table img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid #6D1B72;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(109, 27, 114, 0.4);
    max-width: 100%;
    max-height: 100%;
}

/* Student photo placeholder styling for RTL - fills the rowspan space */
.rtl-layout .student-details-table .photo-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #6D1B72 0%, #36136D 100%);
    border: 3px solid #CF7088;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(109, 27, 114, 0.4);
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.rtl-layout .student-details-table .photo-placeholder .placeholder-text {
    text-align: center;
    color: white;
    font-size: 8pt;
    line-height: 1.2;
    direction: rtl;
}

.rtl-layout .student-details-table .photo-placeholder .placeholder-icon {
    font-size: 16px;
    margin-bottom: 2px;
}

/* Grade Sheet Section for RTL - Improved Layout */
.rtl-layout .grade-sheet table {
    margin-bottom: 2mm;
    direction: rtl;
    table-layout: auto; /* Allow flexible column sizing */
    width: 100%;
    border-collapse: collapse;
}

/* HMIS purple banner — same as skills category row */
.rtl-layout .grade-sheet table tr:first-child td,
.rtl-layout .skills .skills-table tr:first-child td {
    background: #6d1b72 !important;
    background-image: none !important;
    color: #fff !important;
    text-align: center !important;
    font-weight: 700 !important;
    box-shadow: none;
}

.rtl-layout .grade-sheet table tr:first-child td {
    text-transform: uppercase;
}

.rtl-layout .grade-sheet td {
    padding: 3px 2px; /* Slightly more padding */
    text-align: right;
    font-size: 8pt; /* Slightly smaller font for better fit */
    line-height: 1.0; /* Tighter line height */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis for very long content */
    word-wrap: break-word;
}

.rtl-layout .grade-sheet table tr:nth-child(2) td {
    background: linear-gradient(135deg, var(--hmis-accent) 0%, var(--hmis-primary) 100%);
    color: #fff;
    font-weight: bold;
    text-align: start !important;
    font-size: 8pt; /* Smaller header font */
    box-shadow: 0 1px 3px rgba(207, 112, 136, 0.3);
    white-space: normal; /* Allow header text to wrap if needed */
    padding: 2px 1px;
}

/* Serial number column - very narrow */
.rtl-layout .grade-sheet table td:nth-child(1) {
    width: 25px;
    max-width: 25px;
    text-align: center;
    font-size: 7pt;
}

/* Subject column styling for RTL - flexible width */
.rtl-layout .grade-sheet table td:nth-child(2) {
    text-align: right;
    font-weight: bold;
    width: auto;
    min-width: 80px;
    max-width: 120px;
    white-space: normal; /* Allow subject names to wrap */
    word-wrap: break-word;
}

/* Grade sheet data columns for RTL - equal flexible width */
.rtl-layout .grade-sheet table td:nth-child(n+3) {
    text-align: center;
    width: auto;
    min-width: 45px;
    max-width: 70px;
    font-size: 7.5pt;
}

/* Data rows: align all cells to inline start (overrides inline text-align on template cells) */
.rtl-layout .grade-sheet table tr:nth-child(n+3) td {
    text-align: start !important;
    white-space: normal;
}

/* Center the "كشف الدرجات" header */
.rtl-layout .grade-sheet h2,
.rtl-layout .grade-sheet .head {
    text-align: center !important;
    font-size: 12pt;
    font-weight: bold;
    margin: 3mm 0 2mm 0;
    color: var(--hmis-primary);
}

/* Skills Section for RTL — full-width row, equal tables (matches BOS flex layout) */
.rtl-layout .skills {
    margin-bottom: 1rem;
    direction: rtl;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.rtl-layout .skills table {
    border-collapse: collapse;
    margin-bottom: 2mm;
    direction: rtl;
}

/* Skills matrix — same proportions as test.html / BOS (S/N 12%, Item 46%, scores 5×8%) */
.rtl-layout .skills table.skills-table {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    max-width: none;
    table-layout: fixed;
}

.rtl-layout .skills table.skills-table th,
.rtl-layout .skills table.skills-table td {
    border: 1px solid #000;
    padding: 4px 6px;
    line-height: 1.15;
    vertical-align: middle;
    font-size: 9.5pt;
}

.rtl-layout .skills table.skills-table td.skills-sn,
.rtl-layout .skills table.skills-table th.skills-sn {
    width: 12%;
    text-align: start;
    padding-left: 8px;
    padding-right: 8px;
}

.rtl-layout .skills table.skills-table td.skills-label,
.rtl-layout .skills table.skills-table th.skills-label {
    width: 46%;
    text-align: start;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.rtl-layout .skills .skills-table td.skills-item {
    text-transform: capitalize;
}

.rtl-layout .skills table.skills-table td.skills-score,
.rtl-layout .skills table.skills-table th.skills-score {
    width: 8%;
    text-align: center;
    font-weight: 700;
}

.rtl-layout .skills table.skills-table td.skills-score-cell {
    width: 8%;
    text-align: center;
    vertical-align: middle;
    padding: 6px 4px;
}

/* Same as BOS: override Educare .result_body table { table-layout: unset !important } */
.result_body.rtl-layout .skills table.skills-table {
    table-layout: fixed !important;
}

.result_body.rtl-layout .skills table.skills-table col.skills-col-sn {
    width: 12% !important;
}

.result_body.rtl-layout .skills table.skills-table col.skills-col-label {
    width: 46% !important;
}

.result_body.rtl-layout .skills table.skills-table col.skills-col-score {
    width: 8% !important;
}

.result_body.rtl-layout .skills table.skills-table td.skills-sn,
.result_body.rtl-layout .skills table.skills-table th.skills-sn {
    width: 12% !important;
    min-width: 0 !important;
    max-width: none;
    box-sizing: border-box;
    padding-left: 8px !important;
    padding-right: 8px !important;
    text-align: start !important;
}

.result_body.rtl-layout .skills table.skills-table td.skills-label,
.result_body.rtl-layout .skills table.skills-table th.skills-label {
    width: 46% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    text-align: start !important;
}

.result_body.rtl-layout .skills table.skills-table td.skills-score,
.result_body.rtl-layout .skills table.skills-table th.skills-score,
.result_body.rtl-layout .skills table.skills-table td.skills-score-cell {
    width: 8% !important;
    min-width: 0 !important;
    max-width: none;
    box-sizing: border-box;
}

.rtl-layout .skills table:not(.skills-table) tr td {
    border: 1px solid #000;
    padding: 2px;
    text-align: right;
    font-size: 9.5pt;
}

/* Overview Section for RTL */
.rtl-layout .overview {
    margin-bottom: 2mm;
}

.rtl-layout .overview table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
}

.rtl-layout .overview td {
    border: 1px solid #000;
    padding: 2px;
    text-align: right;
    font-size: 9.5pt;
}

.rtl-layout .overview td[colspan="6"] {
    background: linear-gradient(135deg, var(--hmis-primary) 0%, var(--hmis-secondary) 100%);
    color: #fff;
    font-weight: bold;
    text-align: center;
    font-size: 11pt;
    padding: 3px;
    box-shadow: 0 2px 4px rgba(109, 27, 114, 0.3);
}

.rtl-layout .overview td[style*="background-color: #6D1B72"] {
    background: linear-gradient(135deg, var(--hmis-primary) 0%, var(--hmis-secondary) 100%) !important;
    color: #fff !important;
    font-weight: bold;
    text-align: center;
    font-size: 11pt;
    padding: 3px;
    box-shadow: 0 2px 4px rgba(109, 27, 114, 0.3);
}

/* Grading Key Section for RTL */
.rtl-layout .grading-key {
    margin-bottom: 1rem;
}

.rtl-layout .grading-key table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
}

.rtl-layout .grading-key td {
    border: 1px solid #000;
    padding: 2px;
    text-align: center;
    font-size: 9.5pt;
}

.rtl-layout .grading-key td[style*="background-color: #6D1B72"] {
    background: linear-gradient(135deg, var(--hmis-primary) 0%, var(--hmis-secondary) 100%) !important;
    color: #fff !important;
    font-weight: bold;
    text-align: center;
    font-size: 11pt;
    padding: 3px;
    box-shadow: 0 2px 4px rgba(109, 27, 114, 0.3);
}

.rtl-layout .grading-key td[style*="background-color: #f0f0f0"] {
    background: linear-gradient(135deg, var(--hmis-accent) 0%, var(--hmis-primary) 100%) !important;
    color: #fff !important;
    font-weight: bold;
    text-align: center;
    font-size: 10pt;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(207, 112, 136, 0.3);
}

/* Remarks Section for RTL */
.rtl-layout .remarks {
    margin-bottom: 1.35rem;
}

.rtl-layout .remarks table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
}

.rtl-layout .remarks td {
    border: 1px solid #000;
    padding: 2px;
    text-align: right;
    font-size: 9.5pt;
}

/* Image styling for RTL */
.rtl-layout img {
    max-width: 100%;
    height: auto;
}

.rtl-layout img[alt="Signature"],
.rtl-layout img[alt="توقيع المعلم/المعلمة"],
.rtl-layout img[alt="توقيع المدير"] {
    width: 40px;
    height: auto;
    border: none;
    border-radius: 0;
    display: block;
    margin: 0 auto;
}

/* Mobile Responsive Styles for Signatures in RTL Layout */
@media screen and (max-width: 768px) {
	.rtl-layout img.signature-image,
	.rtl-layout img[alt="توقيع المعلم/المعلمة"],
	.rtl-layout img[alt="توقيع المدير"],
	.rtl-layout img[alt*="Signature"],
	.rtl-layout img[alt*="signature"] {
		width: 120px !important;
		min-width: 120px !important;
		max-width: 150px !important;
		height: auto !important;
		display: block !important;
		margin: 8px auto !important;
		border: 2px solid #333 !important;
		border-radius: 4px !important;
		background: #fff !important;
		padding: 4px !important;
		box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
	}
}

.rtl-layout img[alt="Student Image"],
.rtl-layout img[alt="صورة الطالب"] {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid #6D1B72;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(109, 27, 114, 0.4);
    max-width: 100%;
    max-height: 100%;
}

/* Responsive Design for RTL */
@media screen and (max-width: 210mm) {
    .rtl-layout .result_body {
        width: 100%;
        margin: 10px;
        padding: 3mm;
    }
    
    .rtl-layout body {
        background: white;
        margin: 0;
        padding: 0;
    }
}

@media screen and (max-width: 768px) {
    .rtl-layout .result_body {
        width: 100%;
        margin: 5px;
        padding: 2mm;
        box-shadow: none;
    }
    
    .rtl-layout .hmis-banner img {
        width: 100%;
        height: auto;
    }
    
    .rtl-layout .school-address {
        font-size: 8pt !important;
        margin: 3mm 0;
    }
    
    .rtl-layout .student-details-wrapper {
        overflow-x: auto;
        max-width: 100%;
    }
    
    .rtl-layout .student-details-table {
        min-width: 600px;
    }
    
    .rtl-layout .student-details-table td {
        padding: 1px 2px;
        font-size: 8pt;
        white-space: nowrap;
    }
    
    .rtl-layout .student-details-table img,
    .rtl-layout .student-details-table .student-photo,
    .rtl-layout .student-details-table .photo-placeholder {
        width: 80px;
        height: 80px;
    }
    
    .rtl-layout .student-details-table .photo-placeholder .placeholder-text {
        font-size: 7pt;
    }
    
    .rtl-layout .student-details-table .photo-placeholder .placeholder-icon {
        font-size: 14px;
    }
    
    .rtl-layout .student-details-wrapper::before {
        content: "← اسحب للعرض الكامل →";
        display: block;
        text-align: center;
        background: #f0f0f0;
        padding: 5px;
        margin-bottom: 5px;
        border-radius: 4px;
        font-size: 10pt;
        color: #666;
        direction: rtl;
    }

    .rtl-layout .student-details-wrapper.bos-legacy-student-details-outer::before {
        display: none !important;
    }
    
    .rtl-layout .student-details-wrapper::-webkit-scrollbar {
        height: 8px;
    }
    
    .rtl-layout .student-details-wrapper::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .rtl-layout .student-details-wrapper::-webkit-scrollbar-thumb {
        background: #6D1B72;
        border-radius: 4px;
    }
    
    .rtl-layout .student-details-wrapper::-webkit-scrollbar-thumb:hover {
        background: #36136D;
    }
    
    .rtl-layout .grade-sheet {
        overflow-x: auto;
        max-width: 100%;
    }
    
    .rtl-layout .grade-sheet table {
        min-width: 100%; /* Use full width available */
        table-layout: fixed; /* Fixed layout for mobile */
    }
    
    .rtl-layout .grade-sheet td {
        padding: 1px;
        font-size: 7pt; /* Smaller font for mobile */
        white-space: normal; /* Allow wrapping on mobile */
    }
    
    .rtl-layout .grade-sheet table td:nth-child(1) {
        width: 20px; /* Serial number column */
    }
    
    .rtl-layout .grade-sheet table td:nth-child(2) {
        width: 25%; /* Subject column - 25% of table width */
        min-width: 60px;
    }
    
    .rtl-layout .grade-sheet table td:nth-child(n+3) {
        width: auto; /* Data columns share remaining space */
        min-width: 30px;
        font-size: 6.5pt;
    }
    
    .rtl-layout .skills {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        gap: 10px;
    }

    .rtl-layout .skills table {
        min-width: 0;
    }

    .rtl-layout .skills table.skills-table {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .rtl-layout .skills table.skills-table td.skills-label {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .rtl-layout .grading-key--text-block .grading-key-inline-body {
        font-size: 10px;
        line-height: 1.45;
        word-wrap: break-word;
        overflow-wrap: anywhere;
    }
    
    .rtl-layout .grading-key table {
        min-width: 400px;
    }
    
    .rtl-layout .grading-key td {
        padding: 1px;
        font-size: 8pt;
    }
    
    .rtl-layout .overview table {
        min-width: 600px;
    }
    
    .rtl-layout .overview td {
        padding: 1px;
        font-size: 8pt;
    }
    
    .rtl-layout .remarks table {
        min-width: 600px;
    }
    
    .rtl-layout .remarks td {
        padding: 1px;
        font-size: 8pt;
    }
    
    .rtl-layout .grade-sheet::before {
        content: "← اسحب للعرض الكامل للجدول →";
        display: block;
        text-align: center;
        background: #f0f0f0;
        padding: 5px;
        margin-bottom: 5px;
        border-radius: 4px;
        font-size: 10pt;
        color: #666;
        direction: rtl;
    }
    
    .rtl-layout .grade-sheet::-webkit-scrollbar {
        height: 8px;
    }
    
    .rtl-layout .grade-sheet::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .rtl-layout .grade-sheet::-webkit-scrollbar-thumb {
        background: #6D1B72;
        border-radius: 4px;
    }
    
    .rtl-layout .grade-sheet::-webkit-scrollbar-thumb:hover {
        background: #36136D;
    }
}

@media print {
    /* Match non-RTL print: no A4 min-height (avoids stray blank page in Edge/mobile) */
    .result_body.rtl-layout {
        min-height: 0 !important;
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 auto !important;
        box-shadow: none !important;
        position: static !important;
    }

    /* Ensure backgrounds/gradients are preserved when printing */
    .rtl-layout, .rtl-layout * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    .rtl-layout table, .rtl-layout tr, .rtl-layout td, .rtl-layout th {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Fallback solid colors in case gradients are dropped by browser */
    .rtl-layout td[style*="background-color"] {
        background-image: none !important;
        background-color: var(--hmis-primary) !important;
        color: #fff !important;
    }
    .rtl-layout .overview td[colspan="6"] {
        background-image: none !important;
        background-color: var(--hmis-primary) !important;
        color: #fff !important;
    }
    .rtl-layout .grading-key td[style*="background-color"] {
        background-image: none !important;
        background-color: var(--hmis-primary) !important;
        color: #fff !important;
    }
    .rtl-layout .grade-sheet table tr:first-child td,
    .rtl-layout .skills .skills-table tr:first-child td {
        background-color: #6d1b72 !important;
        background-image: none !important;
        color: #fff !important;
        text-align: center !important;
        font-weight: 700 !important;
    }

    .rtl-layout .grade-sheet table tr:nth-child(2) td {
        background-image: none !important;
        background-color: var(--hmis-accent) !important;
        color: #fff !important;
        text-align: start !important;
    }

    .rtl-layout .grade-sheet table tr:nth-child(n+3) td {
        text-align: start !important;
    }

    .rtl-layout .skills .skills-table td.skills-item {
        text-transform: capitalize;
    }

    .rtl-layout .skills .skills-table td.skills-sn,
    .rtl-layout .skills .skills-table th.skills-sn,
    .rtl-layout .skills .skills-table td.skills-label,
    .rtl-layout .skills .skills-table th.skills-label {
        text-align: start !important;
    }

    .rtl-layout .grade-sheet::before,
    .rtl-layout .student-details-wrapper::before {
        display: none !important;
    }
}

@media screen and (max-width: 480px) {
    .rtl-layout .result_body {
        width: 100%;
        margin: 2px;
        padding: 1mm;
    }
    
    .rtl-layout .hmis-banner img {
        width: 100%;
    }
    
    .rtl-layout .school-address {
        font-size: 7pt !important;
        margin: 2mm 0;
    }
    
    .rtl-layout .student-details-table {
        min-width: 500px;
    }
    
    .rtl-layout .student-details-table td {
        padding: 1px;
        font-size: 7pt;
    }
    
    .rtl-layout .student-details-table img,
    .rtl-layout .student-details-table .student-photo,
    .rtl-layout .student-details-table .photo-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .rtl-layout .student-details-table .photo-placeholder .placeholder-text {
        font-size: 6pt;
    }
    
    .rtl-layout .student-details-table .photo-placeholder .placeholder-icon {
        font-size: 12px;
    }
    
    .rtl-layout .grade-sheet table {
        min-width: 600px;
    }
    
    .rtl-layout .grade-sheet td {
        padding: 1px;
        font-size: 6.5pt; /* Even smaller for mobile */
    }
    
    .rtl-layout .grade-sheet table td:nth-child(2) {
        min-width: 80px;
    }
    
    .rtl-layout .skills table.skills-table {
        width: 100% !important;
        min-width: 0 !important;
    }

    .rtl-layout .grading-key--text-block .grading-key-inline-body {
        font-size: 9px;
    }
    
    .rtl-layout .grading-key table {
        min-width: 300px;
    }
    
    .rtl-layout .grading-key td {
        padding: 1px;
        font-size: 7pt;
    }
    
    .rtl-layout .overview table {
        min-width: 500px;
    }
    
    .rtl-layout .overview td {
        padding: 1px;
        font-size: 7pt;
    }
    
    .rtl-layout .remarks table {
        min-width: 500px;
    }
    
    .rtl-layout .remarks td {
        padding: 1px;
        font-size: 7pt;
    }
}

@media screen and (max-width: 768px) and (orientation: landscape) {
    .rtl-layout .result_body {
        width: 100%;
        margin: 5px;
    }
    
    .rtl-layout .grade-sheet table {
        min-width: 1000px;
    }
    
    .rtl-layout .student-details-table {
        min-width: 800px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .rtl-layout .no_print button {
        min-height: 44px;
        min-width: 44px;
        font-size: 16px;
    }
}

/* Remarks section styling for RTL */
.rtl-layout .remarks td:first-child {
    font-weight: bold;
    background: linear-gradient(135deg, var(--hmis-light) 0%, var(--hmis-accent) 20%);
    color: var(--hmis-dark);
}

/* Print button styling for RTL */
.rtl-layout .no_print {
    text-align: center;
    margin: 20px 0;
    direction: rtl;
}

.rtl-layout .no_print button {
    background: linear-gradient(135deg, var(--hmis-primary) 0%, var(--hmis-secondary) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(109, 27, 114, 0.3);
}

.rtl-layout .no_print button:hover {
    background: linear-gradient(135deg, var(--hmis-secondary) 0%, var(--hmis-dark) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(109, 27, 114, 0.4);
}

.rtl-layout .no_print button:active {
    transform: translateY(1px);
}

.rtl-layout .no_print button i {
    margin-left: 5px;
}

/* Pass/Fail styling for RTL */
.rtl-layout .passed {
    color: #28a745;
    font-weight: bold;
}

.rtl-layout .failed {
    color: #dc3545;
    font-weight: bold;
}

/* Reduced motion support for RTL */
@media (prefers-reduced-motion: reduce) {
    .rtl-layout .no_print button {
        transition: none;
    }
    
    .rtl-layout .no_print button:hover {
        background: #6D1B72;
    }
} 