/* ==========================================================================
   CRS Egypt Careers - application styles
   --------------------------------------------------------------------------
   Every rule in this file previously lived either in an inline <style> block or
   in a style="..." attribute. They were moved here so the Content-Security-
   Policy can enforce style-src-attr 'none' with no 'unsafe-inline' anywhere.

   RULE: never reintroduce a style="..." attribute in markup. Add a class here.
   Setting styles from JavaScript (element.style.display = 'block', jQuery
   .css()/.show()/.hide()) is CSSOM and is NOT affected by CSP - it stays valid.
   ========================================================================== */

/* --- Moved from include/header.php ---------------------------------------- */
.crs-hidden            { display: none; }
.crs-capitalize        { text-transform: capitalize; }
.crs-job-hero-bg       { background-image: url(../images/bg_1.jpg); }
.crs-job-title         { color: #00468b; text-transform: capitalize; }
.crs-job-location      { color: #000; }
.crs-border-top-gray   { border-top-color: rgb(221, 221, 221); }

.swal-content-heading        { text-align: center; font-size: 1rem; font-weight: 700; margin-top: 0.8em; }
.swal-content-heading-nodent { text-align: center; font-size: 1rem; font-weight: 700; }
.swal-content-body           { text-align: justify; font-size: 0.9rem; margin-left: 0.5em; margin-right: 0.5em; }
.swal2-container             { z-index: 99999 !important; }

/* --- Moved from job.php (form chrome) ------------------------------------- */
.bootstrap-iso .formden_header h2,
.bootstrap-iso .formden_header p,
.bootstrap-iso form                       { font-family: Arial, Helvetica, sans-serif; color: black; }
.bootstrap-iso form button,
.bootstrap-iso form button:hover          { color: white !important; }
.asteriskField                            { color: red; }
.control-label                            { font-size: 14px; font-weight: bold; }
.bootstrap-iso small                      { color: red; }

/* --- Moved from job.php (share buttons) ----------------------------------- */
.native-share-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
}
.share-btn:hover { opacity: 0.85; color: #fff; }
.share-facebook  { background: #3b5998; }
.share-twitter   { background: #1da1f2; }
.share-linkedin  { background: #0077b5; }
.share-whatsapp  { background: #25d366; }
.share-email     { background: #777; }
.share-copy      { background: #555; }

/* --- Moved from job.php (custom checkboxes) ------------------------------- */
.container-checkbox {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
}
.container-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border: 1px solid #ddd;
}
.container-checkbox:hover input ~ .checkmark        { background-color: #ccc; }
.container-checkbox input:checked ~ .checkmark      { background-color: #2196F3; }
.checkmark:after                                    { content: ""; position: absolute; display: none; }
.container-checkbox input:checked ~ .checkmark:after { display: block; }
.container-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* --- Moved from job.php (file upload control) ----------------------------- */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}
.file-select        { display: flex; align-items: center; }
.file-select-button {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}
.file-select-name   { flex: 1; color: #666; }
.file-upload input[type=file] { position: absolute; left: -9999px; }

/* --- Moved from job.php (matrix table) ------------------------------------ */
.form-matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}
.form-matrix-table th,
.form-matrix-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #ddd;
}
.form-matrix-table th { background-color: #f8f9fa; font-weight: bold; }

/* --- Moved from job.php (SweetAlert2 overrides) --------------------------- */
.swal2-content                { padding: 0; }
.swal2-actions                { margin: 0; }
.swal2-cancel                 { font-size: 0.9em !important; background-color: #CA0B00 !important; }
.swal2-confirm                { font-size: 0.9em !important; }
.swal2-styled.swal2-confirm   { background-color: #00b300 !important; }
.swal2-icon                   { width: 4em; height: 4em; margin: 0.4em auto 1.2em; }
.swal2-icon .swal2-icon-content { font-size: 3em; }

@media only screen and (min-width: 992px) {
    .swal2-html-container {
        max-height: 15em;
        -webkit-overflow-scrolling: touch;
        overflow-y: scroll;
        width: 100%;
        margin-bottom: 0.8em;
        border-style: solid;
        border-width: thin;
        border-color: #aaa;
        border-radius: 5px;
    }
}
@media only screen and (min-width: 1200px) {
    .swal2-html-container {
        max-height: 15em;
        -webkit-overflow-scrolling: touch;
        overflow-y: scroll;
        width: 100%;
        margin-bottom: 0.8em;
        border-style: solid;
        border-width: thin;
        border-color: #aaa;
        border-radius: 5px;
    }
}
@media only screen and (min-device-width: 480px) {
    .swal2-html-container {
        max-height: unset;
        -webkit-overflow-scrolling: unset;
        overflow-y: unset;
        width: unset;
        margin-bottom: unset;
    }
}
@media only screen and (min-device-width: 768px) {
    .swal2-html-container {
        max-height: 15em;
        -webkit-overflow-scrolling: touch;
        overflow-y: scroll;
        width: 100%;
        margin-bottom: 0.8em;
    }
}

/* --- Replaces style="padding-top: 5rem;" on the notice pages -------------- */
.crs-notice-body { padding-top: 5rem; }

/* --- Replaces the inline <style> block in maintenance.php ----------------- */
.crs-maintenance-body {
    text-align: center;
    padding: 150px;
    font: 20px Helvetica, sans-serif;
    color: #333;
}
.crs-maintenance-body h1      { font-size: 50px; }
.crs-maintenance-body article { display: block; text-align: left; width: 650px; margin: 0 auto; }
.crs-maintenance-body a       { color: #dc8100; text-decoration: none; }
.crs-maintenance-body a:hover { color: #333; text-decoration: none; }
