/* OpoCore admin — modern look, scoped under .adminContext so it never bleeds
   into the public site (which uses site.css and mirrors the legacy design).
   All sizes in rem; admin root font-size = 0.75rem (= 12px). */

.adminContext { font-size: 0.75rem; font-family: Arial, sans-serif; direction: rtl; color: #2b2b2b; }
.adminContext .screen { padding: 2rem; max-width: 90rem; }
.adminContext a { color: #0097f1; text-decoration: none; }
.adminContext a:hover { text-decoration: underline; }
.adminContext h1 { color: #001b46; margin: 0 0 1.5rem 0; font-size: 2.2rem; }
.adminContext h2 { color: #465c74; margin: 2rem 0 1rem 0; font-size: 1.6rem; }
.adminContext h3 { color: #465c74; margin: 1.5rem 0 0.5rem 0; font-size: 1.3rem; }

/* admin landing cards */
.adminContext .adminCards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}
.adminContext .adminCards input[type=button] {
    padding: 1.5rem;
    background: white;
    border: none;
    border-radius: 0.3rem;
    box-shadow: 0 0.1rem 0.4rem rgba(0,0,0,0.08);
    font-size: 1.2rem;
    cursor: pointer;
    color: #001b46;
}
.adminContext .adminCards input[type=button]:hover { background: #0097f0; color: white; }

/* login form */
.adminContext .loginForm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
    max-width: 40rem;
}
.adminContext .loginForm label { display: flex; flex-direction: column; font-size: 1rem; color: #465c74; }
.adminContext .loginForm input[type=text], .adminContext .loginForm input[type=password] {
    font: inherit; padding: 0.6rem; border: 0.08rem solid #c3c8cf; border-radius: 0.3rem; background: white; margin-top: 0.3rem;
}
.adminContext input[type=button].primary {
    background-color: #0097f0; color: white;
    padding: 0.8rem 2rem; border: none; cursor: pointer;
    margin-top: 1rem; border-radius: 0.3rem; font-size: 1.1rem;
    grid-column: 1 / -1; justify-self: start;
}
.adminContext input[type=button].primary:hover { background-color: #007ac3; }

/* TableMakerEx rendering */
.adminContext .table {
    background-color: #465c74;
    width: 96%;
    margin: 1rem auto;
    color: white;
    padding-top: 2rem;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.adminContext .table > label { margin-right: 1rem; height: 2rem; font-size: 2rem; }
.adminContext .table > svg { vertical-align: top; filter: invert(1); margin-right: 1rem; }
.adminContext table { background-color: white; border: none; width: 100%; margin-top: 2rem; color: black; cursor: default; }
.adminContext th { color: #0097f1; border-bottom: 0.08rem solid #dfe5e9; font-weight: bold; padding-right: 2.5rem; }
.adminContext td, .adminContext th { text-align: right; border-bottom: 0.08rem solid #dfe5e9; padding: 1rem; }
.adminContext .addButton {
    font-size: 2rem; font-weight: bold;
    width: 2.5rem; height: 2.5rem; border-radius: 2.5rem;
    text-align: center; border: none; margin-right: 1rem; cursor: pointer;
}
.adminContext #toolbar {
    position: absolute; top: 6.6rem;
    background-color: white;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,.5);
    color: #0097f1; font-size: 1.2rem; font-weight: bold;
}
.adminContext #toolbar > div { padding: 0.6rem 1.2rem; cursor: pointer; }
.adminContext #toolbar > div:hover { background-color: #a0a0a0; }

/* form popups */
.adminContext .overlay {
    position: fixed; left: 0; top: 0;
    background-color: black; opacity: 0.3;
    width: 100vw; height: 100vh;
}
.adminContext #formDiv, .adminContext .popupPanel {
    position: fixed;
    left: 18%; top: 5%;
    width: 60%; max-height: 90vh; overflow-y: auto;
    background: white; border: 0.08rem solid #e3e9ed; padding: 1%;
    z-index: 100;
}
.adminContext .popupPanel {
    left: calc(50% - 20rem); top: 20%; width: 40rem; font-size: 2rem; text-align: center;
}
.adminContext .popupPanel > input { display: none; }
.adminContext #popUpQuestion input { display: inline-block; }
.adminContext #formDiv > label, .adminContext #formDiv label + input {
    display: inline-block; height: 2rem; width: 40%; border: none;
}
.adminContext #formDiv label + input { border-bottom: 0.17rem solid #dae0e4; }
.adminContext #formDiv > input[type=button], .adminContext #popUpQuestion input[type=button] {
    background-color: #0097f0; color: white;
    padding: 1rem; border: none; cursor: pointer;
    margin: 0.2rem; border-radius: 0.3rem;
}
.adminContext .pager { font-size: 1.5rem; display: block; margin: 0.6rem auto; text-align: center; }
.adminContext .pager > span { cursor: pointer; }
.adminContext .pager > span > input { width: 4rem; text-align: center; }

/* The popup/overlay markup is appended to <body>, NOT inside .adminContext.
   Re-declare without the prefix so popups still appear correctly. */
.overlay { position: fixed; left: 0; top: 0; background: black; opacity: 0.3; width: 100vw; height: 100vh; z-index: 99; }
.popupPanel {
    position: fixed; left: calc(50% - 20rem); top: 20%; width: 40rem;
    background: white; border: 1px solid #e3e9ed; padding: 1rem; z-index: 100;
    font-size: 2rem; text-align: center;
}
.popupPanel input[type=button] {
    background-color: #0097f0; color: white;
    padding: 0.5rem 1.2rem; border: none; cursor: pointer;
    border-radius: 0.3rem; font-size: 1rem; margin-top: 1rem;
}
