/* 35th Annual Saudi-Japan Joint Symposium
   Shared styles for the registration form + payment pages.

   Ported from the sibling KFUPM sites so the accumulated fixes come with it
   (notably the intl-tel-input rules, which hide the CDN's broken flag sprite
   and turn the dial-code box into a real button). Recoloured to this design's
   palette - primary #289b6c, dark #17684b, accent #cf2a3a - and the card
   shadow softened because this design's body is light, not dark. */

/* White card on the design's light body, same idiom as the hand-built pages
   (.bg-white + .border + .rounded-lg + .shadow-sm) */
.sj-card {
    background: #ffffff;
    border: 1px solid #eef1f4;
    box-shadow: 0 4px 24px rgba(32, 37, 42, .07);
    border-radius: 12px;
    /* Readable default for any generic copy on the card (e.g. the T&C body) */
    color: #3a4149;
}

.sj-section-title {
    color: #17684b;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #289b6c;
}

/* Page-level copy sits on the light body — keep it readable */
.sj-form-page .text-muted { color: #79828c !important; }

/* Form controls on the white card */
.sj-form .form-control,
.sj-form .custom-select {
    background-color: #ffffff;
    border: 1px solid #d8dee2;
    color: #222222;
    height: calc(1.6em + 1rem + 2px);
    padding: .5rem .9rem;
    border-radius: 8px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.sj-form textarea.form-control { height: auto; }

.sj-form .form-control:focus,
.sj-form .custom-select:focus {
    background-color: #ffffff;
    border-color: #289b6c;
    box-shadow: 0 0 0 .15rem rgba(40, 155, 108, .18);
    color: #222222;
    outline: 0;
}

.sj-form .form-control::placeholder { color: #9aa3ad; }

.sj-form .custom-select option {
    color: #222222;
    background: #ffffff;
}

.sj-form .custom-select option:disabled { color: #99a1a9; }

.sj-form .custom-select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23222222' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 8px 10px;
    -webkit-appearance: none;
    appearance: none;
}

.sj-form label { width: 100%; }

.sj-form .field-label {
    color: #5b6770;
    font-size: 17px;
    line-height: 1.2;
    margin-bottom: 6px;
}

/* Radios / checkboxes — brand green accent */
.sj-form .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #289b6c;
    border-color: #289b6c;
}

.sj-form .custom-control-label::before {
    background-color: #ffffff;
    border: 1px solid #b9c2c9;
}

.sj-form .custom-radio .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23ffffff'/%3E%3C/svg%3E");
}

.sj-form .custom-control-label { color: #222222; }

/* Validation states */
.sj-form .form-control.is-invalid,
.sj-form .custom-select.is-invalid { border-color: #cf2a3a; }

.sj-form .invalid-feedback { color: #cf2a3a; }

/* Buttons — the design's solid green pill CTA */
.btn-sj {
    background: #289b6c;
    border: 2px solid #289b6c;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: .5px;
    border-radius: 50px;
    padding: .8rem 2.4rem;
    transition: background-color .25s ease, border-color .25s ease;
}

.btn-sj:hover,
.btn-sj:focus {
    background: #17684b;
    border-color: #17684b;
    color: #ffffff;
}

.btn-sj-outline {
    background: transparent;
    border: 2px solid #289b6c;
    color: #289b6c;
    font-weight: 700;
    border-radius: 50px;
    padding: .7rem 2.2rem;
    transition: background-color .2s ease, color .2s ease;
}

.btn-sj-outline:hover,
.btn-sj-outline:focus {
    background-color: #289b6c;
    color: #ffffff;
}

/* Alerts */
.sj-form-page .alert-danger,
.sj-form-page .alert-success {
    border-radius: 12px;
}

/* intl-tel-input: dial-code box as a button (mirrors MC/SC/SAS/TIS pattern) */
.sj-form .iti { width: 100%; }

.sj-form .iti__country-list {
    z-index: 1051;
    background-color: #ffffff !important;
    color: #222 !important;
    max-height: 260px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.sj-form .iti__country,
.sj-form .iti__country-name { color: #222 !important; }

.sj-form .iti__dial-code { color: #6c757d !important; }

.sj-form .iti__country.iti__highlight,
.sj-form .iti__country:hover { background-color: #f1f3f5 !important; }

.sj-form .iti__divider { border-bottom-color: #e9ecef !important; }

/* Hide broken flag sprite from CDN */
.sj-form .iti__flag,
.sj-form .iti__flag-box,
.sj-form .iti__flag-container .iti__flag {
    display: none !important;
    background: none !important;
}

.sj-form .iti__country { padding: 6px 12px !important; }
.sj-form .iti__country-name { margin-left: 0 !important; }

.sj-form .iti--separate-dial-code .iti__selected-flag {
    background-color: #f4f6f5 !important;
    color: #222222 !important;
    padding: 0 10px 0 12px !important;
    border-right: 1px solid #d8dee2 !important;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    transition: background-color .15s ease;
    min-width: 78px;
}

.sj-form .iti--separate-dial-code .iti__selected-flag:hover,
.sj-form .iti--separate-dial-code .iti__selected-flag[aria-expanded="true"] {
    background-color: #289b6c !important;
}

.sj-form .iti--separate-dial-code .iti__selected-flag:hover .iti__selected-dial-code,
.sj-form .iti--separate-dial-code .iti__selected-flag[aria-expanded="true"] .iti__selected-dial-code {
    color: #ffffff !important;
}

.sj-form .iti--separate-dial-code .iti__selected-dial-code {
    color: #222222 !important;
    font-weight: 600;
    font-size: 15px;
    margin-left: 0 !important;
}

.sj-form .iti--separate-dial-code .iti__arrow {
    border: 0 !important;
    width: 12px;
    height: 12px;
    margin-left: 8px !important;
    position: relative;
}

.sj-form .iti--separate-dial-code .iti__arrow::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #222222;
    border-bottom: 2px solid #222222;
    transform: translate(-50%, -70%) rotate(45deg);
}

.sj-form .iti--separate-dial-code .iti__selected-flag:hover .iti__arrow::before,
.sj-form .iti--separate-dial-code .iti__selected-flag[aria-expanded="true"] .iti__arrow::before {
    border-color: #ffffff;
}

.sj-form .iti--separate-dial-code .iti__arrow--up::before {
    transform: translate(-50%, -30%) rotate(-135deg);
}


/* ---------------------------------------------------------------------------
   Terms & Conditions accordion (was an inline <style> in the sibling sites)
   --------------------------------------------------------------------------- */
.tc-accordion > summary {
    display: flex;
    align-items: center;
    cursor: pointer;
    list-style: none;
    outline: none;
}
.tc-accordion > summary::-webkit-details-marker { display: none; }
.tc-accordion > summary::marker { content: ''; }
.tc-accordion > summary:hover { opacity: .85; }

/* Right-aligned chevron that flips when the accordion opens */
.tc-accordion .tc-arrow { order: 2; margin-left: auto; font-size: 0; line-height: 0; }
.tc-accordion .tc-arrow::before {
    content: '';
    display: inline-block;
    width: 11px;
    height: 11px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .25s ease;
}
.tc-accordion[open] .tc-arrow::before { transform: rotate(-135deg); }
.tc-accordion ul { padding-left: 1.1rem; }

.sj-card .tc-accordion strong { color: #17684b; }
.sj-card .tc-accordion a { color: #289b6c; text-decoration: underline; }
.sj-card .tc-accordion a:hover { color: #cf2a3a; }

/* ---------------------------------------------------------------------------
   Papers repeater
   --------------------------------------------------------------------------- */
.paper-item {
    background: #f7f9fa;
    border: 1px solid #e6eaed;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

/* ---------------------------------------------------------------------------
   Payment method tiles
   --------------------------------------------------------------------------- */
.sj-pay-method {
    border: 2px solid #e6eaed;
    border-radius: 12px;
    padding: 1.25rem;
    background: #ffffff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    cursor: pointer;
    display: block;
    height: 100%;
    text-align: center;
}
.sj-pay-method:hover {
    border-color: #289b6c;
    box-shadow: 0 6px 20px rgba(40, 155, 108, .15);
    transform: translateY(-2px);
    text-decoration: none;
}
.sj-pay-method img { max-height: 46px; width: auto; }
.sj-pay-method span { display: block; margin-top: .65rem; font-weight: 600; color: #20252a; }
