/* فونت رسمی آیکون‌های SAP که مستقیم از سرور گوته دانلود کردیم */
@font-face {
    font-family: 'SAP-icons';
    src: url('../fonts/SAP-icons.woff2') format('woff2'),
         url('../fonts/SAP-icons.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* فونت‌های اختصاصی SAP 72 که مستقیم از سرور گوته دانلود کردیم */
@font-face {
    font-family: '72';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/72-Regular.woff2') format('woff2');
}

@font-face {
    font-family: '72';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/72-Bold.woff2') format('woff2');
}

@font-face {
    font-family: '72full';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/72-Regular-full.woff2') format('woff2');
}

@font-face {
    font-family: '72full';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/72-Bold-full.woff2') format('woff2');
}

/* استایل‌های رسمی فریم‌ورک SAP UI5 برگرفته از سورس اصلی گوته */
:root {
    --sapPrimary: #006ec9;
    --sapPrimaryHover: #005a9e;
    --sapBrandGreen: #9bc225;
    --sapTextColor: #0e2029;
    --sapTextMuted: rgba(14, 32, 41, 0.64);
    --sapBorderColor: #bfbfbf;
    --sapErrorRed: #c5221f;
    --sapSuccessGreen: #107c41;
    --sapFont: "72", "72full", Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background-color: #ffffff;
    font-family: var(--sapFont);
    color: var(--sapTextColor);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ساختار پوسته اصلی به سبک SAP UI5 */
.sapMShell {
    background-color: #ffffff;
    width: 100%;
    min-height: 100vh;
}

.sapMShellAppWidthLimited {
    width: 100%;
    margin: 0 auto;
}

.sapMShellCentralBox {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    background-color: #ffffff;
    position: relative;
}

.sapMShellContent {
    background-color: #ffffff;
    padding: 0;
    width: 100%;
}

/* فلکس‌باکس‌های استاندارد SAP */
.sapMFlexBox {
    display: flex;
}

.sapMVBox {
    flex-direction: column;
}

.sapMHBox {
    flex-direction: row;
}

.sapMFlexBoxJustifySpaceBetween {
    justify-content: space-between;
}

.sapMFlexBoxJustifyStart {
    justify-content: flex-start;
}

.sapMFlexBoxJustifyCenter {
    justify-content: center;
}

.sapMFlexBoxAlignItemsCenter {
    align-items: center;
}

.sapMFlexBoxAlignItemsStretch {
    align-items: stretch;
}

/* فاصله‌های رسمی کنترل‌های SAP */
.sapUiSmallMargin {
    padding: 0;
}

.sapUiSmallMarginEnd {
    margin-right: 12px;
}

.sapUiTinyMarginEnd {
    margin-right: 6px;
}

.sapUiSmallMarginBottom {
    margin-bottom: 16px;
}

.sapUiMediumMarginTop {
    margin-top: 24px;
}

.sapUiMediumMarginBottom {
    margin-bottom: 20px;
}

.sapUiMediumMarginTopBottom {
    margin-top: 56px;
    margin-bottom: 30px;
}

/* سیستم شبکه رسپانسیو و تورفتگی استاندارد فرم در SAP UI5 */
.sapUiRespGrid {
    display: block;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.sapUiRespGridSpanL8 {
    width: 66.666667%;
    margin-left: 16.666667%;
    box-sizing: border-box;
    padding: 0 16px;
}

@media (max-width: 1024px) {
    .sapUiRespGridSpanL8 {
        width: 83.333333%;
        margin-left: 8.333333%;
    }
}

@media (max-width: 768px) {
    .sapUiRespGridSpanL8 {
        width: 100%;
        margin-left: 0;
        padding: 0 12px;
    }
}

/* بخش هدر در پهنای کامل ۱۲۸۰ پیکسل */
#__hbox3 {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 10px 20px;
    box-sizing: border-box;
}

.sapMImg {
    max-height: 52px;
    width: auto;
    cursor: default;
    display: block;
}

/* استایل رسمی آیکون‌های SAP UI5 */
.sapUiIcon {
    font-family: 'SAP-icons', sans-serif !important;
    speak: none;
    font-weight: normal;
    font-style: normal;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* دکمه‌های استاندارد SAP UI5 در هدر (راهنما و تغییر زبان) */
.sapMBtn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    vertical-align: middle;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.sapMBtnInner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    line-height: 24px;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid transparent; /* برای جلوگیری از هرگونه پرش موقع هاور */
    padding: 0 8px;
    font-family: var(--sapFont);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* حالت شفاف: دکمه راهنما و دکمه زبان غیرفعال */
.sapMBtnTransparent {
    background-color: transparent;
    border-color: transparent;
    color: var(--sapPrimary);
}

/* وقتی ماوس میره روی دکمه‌های شفاف، کادر آبی دقیق با پس‌زمینه محو می‌افته دورش */
.sapMBtn:hover .sapMBtnTransparent,
.sapMBtn:focus .sapMBtnTransparent,
.sapMBtnInner.sapMBtnTransparent:hover,
.sapMBtnInner.sapMBtnTransparent:focus {
    background-color: #ebf5fe !important;
    border-color: #006ec9 !important;
    color: #006ec9 !important;
    outline: none;
}

/* دکمه زبان فعال: کادر و پس‌زمینه پر آبی با نوشته سفید */
.sapMBtnEmphasized {
    background-color: var(--sapPrimary) !important;
    border-color: var(--sapPrimary) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.sapMBtn:hover .sapMBtnEmphasized,
.sapMBtn:focus .sapMBtnEmphasized,
.sapMBtnInner.sapMBtnEmphasized:hover,
.sapMBtnInner.sapMBtnEmphasized:focus {
    background-color: #005a9e !important;
    border-color: #005a9e !important;
    color: #ffffff !important;
    outline: none;
}

/* تنظیمات تکمیلی دکمه راهنما */
.verification-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.verification-button .sapUiIcon {
    margin-right: 6px;
    color: inherit;
    font-size: 15px;
    display: inline-flex;
}

/* تنظیمات تکمیلی دکمه‌های زبان */
.lang-btn {
    min-width: 35px;
    display: inline-flex;
    cursor: pointer;
}

.lang-btn .sapMBtnInner {
    min-width: 35px;
    padding: 0 8px;
    font-weight: 600;
}

/* تیتر و متن توضیحات دقیقا با فواصل کالیبره‌شده سایت اصلی گوته */
.verification-title {
    font-size: 36px;
    line-height: 44px;
    font-weight: bold;
    color: #0e2029;
    opacity: 100%;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-top: 24px;
    margin-bottom: 22px; /* فاصله دقیق ۳۷ پیکسلی زیر تیتر */
}

.verification-description {
    font-size: 16px;
    line-height: 24px;
    color: #0e2029;
    opacity: 64%;
}

.verification-description ol {
    margin: 18px 0 20px 0;
    padding-left: 18px; /* تورفتگی جمع‌وجور ۹ پیکسلی مطابق سایت اصلی */
    box-sizing: border-box;
}

.verification-description li {
    margin-bottom: 12px; /* فاصله ۱۷ تا ۲۰ پیکسلی بین خط اول و دوم لیست */
    line-height: 24px;
}

.verification-description li:last-child {
    margin-bottom: 0;
}

/* فاصله دقیق فرم تا انتهای توضیحات */
#__vbox0 {
    margin-top: 36px !important; /* فاصله دقیق ۳۹ پیکسلی از انتهای متن تا تاریخ تولد */
}

.verification-description a,
.verification-description .sapMLnk {
    vertical-align: initial;
    color: #006ec9;
    text-decoration: none;
}

.verification-description a:hover,
.verification-description .sapMLnk:hover {
    text-decoration: underline;
}

/* برچسب‌های فیلدها مطابق سورس رسمی گوته */
.verification-label {
    color: #0e2029;
    opacity: 64%;
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 4px;
    display: inline-block;
}

/* کادرهای ورودی در حالت فشرده رسمی sapUiSizeCompact */
.sapMInputBaseContentWrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--sapBorderColor);
    border-radius: 4px !important;
    background-color: #ffffff;
    height: 26px !important; /* ارتفاع دقیق ۲۶ پیکسل برای حالت کامپکت رسمی */
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

.sapMInputBaseContentWrapper:hover,
.sapMInputBaseContentWrapper:focus-within {
    border-color: #006ec9;
}

/* وضعیت خطای ورودی مطابق با استانداردهای رسمی SAP UI5 استخراج‌شده از گوته */
.sapMInputBaseContentWrapperError {
    border: 2px solid #bb0000 !important;
    border-radius: 2px !important;
}

.sapMInputBaseContentWrapperError:hover,
.sapMInputBaseContentWrapperError:focus-within {
    border-color: #bb0000 !important;
}

.sapMInputBaseContentWrapperError .sapMInputBaseIconContainer {
    color: #0854a0 !important; /* در سایت اصلی آیکون تقویم آبی می‌ماند و قرمز نمی‌شود */
}

.sapMInputBaseInner {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    height: 100%;
    padding: 0 8px;
    font-family: var(--sapFont);
    font-size: 13.5px;
    color: #0e2029;
    box-sizing: border-box;
}

.sapMInputBaseInner::placeholder {
    color: #757575;
    font-style: italic;
    font-size: 13px;
}

/* آیکون تقویم در حالت فشرده ۲۶ پیکسلی - دقیقاً مثل سایت اصلی هیچ خط جداکننده‌ای کنارش نداره */
.sapMInputBaseIconContainer {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 100%;
    border-left: none !important; /* سایت اصلی خط جداکننده نداره */
    cursor: pointer;
    color: var(--sapPrimary);
    background-color: transparent;
    box-sizing: border-box;
    transition: color 0.15s ease;
    padding-right: 4px;
}

.sapMInputBaseIconContainer:hover {
    background-color: transparent;
    color: var(--sapPrimaryHover);
}

.sapMInputBaseIconContainer.active {
    color: var(--sapPrimaryHover) !important;
}

.sapMInputBaseIconContainer .sapUiIcon {
    font-size: 15px;
    color: inherit;
    display: inline-flex;
}

.sapMInputBaseIconContainer svg {
    width: 15px;
    height: 15px;
    display: block;
}

/* پیام وضعیت خطا و تایید */
.inline-status-box {
    margin-top: 12px;
    margin-bottom: 12px;
    line-height: 1.45;
}

.inline-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--sapErrorRed);
    font-size: 13px;
    font-weight: 500;
}

.inline-error .cross-icon {
    font-weight: 900;
    font-size: 15px;
    color: var(--sapErrorRed);
    line-height: 1.1;
}

.inline-error .error-mail-link {
    color: var(--sapErrorRed);
    text-decoration: underline;
}

.inline-valid {
    color: var(--sapSuccessGreen);
    font-size: 13.5px;
    font-weight: 600;
}

/* دکمه‌های Clear و Verify دقیقاً مطابق با سورس رسمی گوته */
#__hbox13 {
    margin-top: 36px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* دکمه بازنشانی (Zurücksetzen / Clear) با کادر آبی رسمی گوته */
#__button2 {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    cursor: pointer;
}

#__button2 .sapMBtnInner {
    height: 26px;
    line-height: 24px;
    border: 1px solid #006ec9 !important; /* کادر آبی دقیق گوته */
    border-radius: 4px;
    background-color: #ffffff;
    color: var(--sapPrimary);
    padding: 0 10px;
    box-sizing: border-box;
    font-family: var(--sapFont);
    font-size: 14px;
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

#__button2:hover .sapMBtnInner,
#__button2:focus .sapMBtnInner {
    background-color: #ebf5fe !important;
    border-color: #006ec9 !important;
    color: #006ec9 !important;
    outline: none;
}

/* دکمه استعلام (Prüfen / Verify) جمع‌وجور با پس‌زمینه پر آبی و گوشه‌های گرد */
#__button3 {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    cursor: pointer;
}

#__button3 .sapMBtnInner {
    height: 26px;
    line-height: 24px;
    border: 1px solid #006ec9 !important;
    border-radius: 4px;
    background-color: #006ec9 !important;
    color: #ffffff !important;
    padding: 0 10px;
    box-sizing: border-box;
    font-family: var(--sapFont);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

#__button3:hover .sapMBtnInner,
#__button3:focus .sapMBtnInner {
    background-color: #005a9e !important;
    border-color: #005a9e !important;
    color: #ffffff !important;
    outline: none;
}

/* تقویم SAP UI5 Fiori DatePicker */
.calendar-popup {
    position: absolute;
    z-index: 2000;
    background-color: #ffffff;
    border: 1px solid var(--sapBorderColor);
    border-radius: 2px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    width: 320px;
    padding: 10px;
    font-family: var(--sapFont);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 8px;
}

.cal-nav-btn {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: var(--sapPrimary);
    padding: 2px 8px;
}

.cal-header-pills {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-pill-btn {
    background: none;
    border: none;
    font-family: var(--sapFont);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--sapPrimary);
    padding: 3px 8px;
    border-radius: 2px;
    cursor: pointer;
}

.cal-pill-btn:hover, .cal-pill-btn.active {
    background-color: #e8f4fd;
}

.cal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.cal-weekday-row th {
    padding: 5px 2px;
    font-weight: 600;
    color: #4b5563;
    text-align: center;
}

.cw-header {
    width: 24px;
}

.cal-cw-cell {
    color: #9ca3af;
    font-size: 11px;
    text-align: center;
    padding: 6px 2px;
    cursor: default;
    border-right: 1px solid #f3f4f6;
}

.cal-day-cell {
    text-align: center;
    padding: 6px 2px;
    cursor: pointer;
    border-radius: 2px;
    color: #1f2937;
}

.cal-day-cell:hover {
    background-color: #e0f2fe;
}

.cal-day-cell.other-month {
    color: #9ca3af;
}

.cal-day-cell.selected {
    background-color: var(--sapPrimary) !important;
    color: #ffffff !important;
    font-weight: 700;
}

.cal-grid-months {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px 4px;
}

.cal-month-item {
    padding: 10px 4px;
    text-align: center;
    font-size: 13px;
    border-radius: 2px;
    cursor: pointer;
    color: #374151;
}

.cal-month-item:hover {
    background-color: #e0f2fe;
}

.cal-month-item.selected {
    background-color: var(--sapPrimary);
    color: #ffffff;
    font-weight: 600;
}

.cal-grid-years {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px 4px;
}

.cal-year-item {
    padding: 8px 2px;
    text-align: center;
    font-size: 12.5px;
    border-radius: 2px;
    cursor: pointer;
    color: #374151;
}

.cal-year-item:hover {
    background-color: #e0f2fe;
}

.cal-year-item.selected {
    background-color: var(--sapPrimary);
    color: #ffffff;
    font-weight: 600;
}

/* مشخصات نتیجه مدرک معتبر */
.cert-result-container {
    margin-top: 36px;
}

.info-block {
    margin-bottom: 22px;
}

.info-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 22px;
}

.col-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 13px;
    color: #555555;
    margin-bottom: 4px;
    font-weight: 400;
}

.info-val {
    font-size: 14.5px;
    font-weight: 600;
    color: #111827;
}

.scores-table-container {
    margin-top: 22px;
    margin-bottom: 22px;
    overflow-x: auto;
}

.goethe-scores-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.goethe-scores-table th {
    text-align: left;
    padding: 8px 12px 10px 0;
    font-weight: 600;
    color: #555555;
    border-bottom: 1px solid #e5e7eb;
}

.goethe-scores-table td {
    padding: 10px 12px 10px 0;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
}

.final-verification-note {
    margin-top: 32px;
    line-height: 1.6;
}

.final-match-complete {
    color: var(--sapSuccessGreen);
    font-weight: 700;
    font-size: 13.5px;
    margin-bottom: 4px;
}

.final-mismatch-notice {
    font-size: 13px;
    color: #374151;
}

.link-highlight {
    color: var(--sapPrimary);
    text-decoration: none;
}

.link-highlight:hover {
    text-decoration: underline;
}

/* فوتر */
.footer-vbox {
    margin-top: 56px;
    margin-bottom: 30px;
}

.footer-hbox {
    display: flex;
    justify-content: center;
    gap: 24px;
}

/* لینک‌های فوتر طبق سورس گوته */
.footer-link {
    color: #006ec9;
    opacity: 64%;
    font-size: 14px;
    text-decoration: none;
}

.footer-link:hover, .footer-link:focus {
    color: #006ec9;
    opacity: 64%;
    text-decoration: underline;
}

/* دیالوگ خطای پاپ‌آپ رسمی SAP UI5 MessageBox طبق مشخصات دقیق استخراج‌شده از سرور زنده گوته */
.sapUiBLFix {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
}

.sapMDialog.sapMMessageBoxError {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.42) 0px 0px 0px 1px, rgba(0, 0, 0, 0.3) 0px 20px 80px 0px;
    width: 540px;
    max-width: calc(100% - 32px);
    z-index: 2001;
    font-family: var(--sapFont);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.sapMDialogHeader {
    height: 40px;
    background-color: #ffffff;
    box-shadow: rgb(187, 0, 0) 0px -1px 0px 0px inset;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    box-sizing: border-box;
}

.sapMDialogHeaderBar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sapMDialogHeader .sapMDialogIcon {
    font-family: 'SAP-icons' !important;
    font-size: 16px;
    color: rgb(187, 0, 0);
    margin-right: 8px;
    line-height: 1;
    display: inline-block;
    speak: none;
    font-style: normal;
    font-weight: normal;
}

.sapMDialogHeader .sapMDialogTitle {
    font-size: 16px;
    font-weight: 400;
    color: rgb(50, 54, 58);
    margin: 0;
    line-height: 32px;
}

.sapMDialogSection {
    padding: 16px;
    background-color: #ffffff;
    box-sizing: border-box;
}

.sapMDialogSection .sapMMsgBoxText {
    font-size: 14px;
    color: rgb(50, 54, 58);
    font-weight: 400;
    line-height: normal;
    display: block;
    text-align: left;
}

.sapMDialogFooter {
    height: 40px;
    border-top: 1px solid rgb(217, 217, 217);
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 16px;
    box-sizing: border-box;
}

.sapMDialogFooter .sapMBtn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.sapMDialogFooter .sapMBtnInner {
    height: 26px;
    line-height: 24px;
    font-size: 14px;
    font-weight: 400;
    padding: 0 12px;
    border-radius: 4px;
    border: 1px solid #0854a0;
    background-color: #ffffff;
    color: #0854a0;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sapMDialogFooter .sapMBtnInner:hover {
    background-color: #ebf5fe;
    border-color: #006ec9;
    color: #006ec9;
}

/* نمایش وضعیت در خط (ObjectStatus) مطابق با فرمت رسمی گوته */
.sapMObjStatus {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    line-height: 20px;
    margin-top: 10px;
    margin-bottom: 6px;
    gap: 6px;
}

.sapMObjStatusSuccess {
    color: #107c41;
}

.sapMObjStatusError {
    color: #c5221f;
}

.sapMObjStatusError a {
    color: #c5221f;
    text-decoration: underline;
}

.status-placeholder-spacer {
    height: 20px;
    margin-top: 10px;
    margin-bottom: 6px;
}

.hidden {
    display: none !important;
}
