/* Header user menu > Profile   V1.2 - 2026-09-30 (tabs: contact details, training records, passports / visas) */

/* the dropdowns of Select2 live inside the dialog (dropdownParent) and may reach over its edge */
.ui-dialog.userProfile-dialog,
.ui-dialog.userProfile-dialog #userProfileDialog{
    overflow: visible;
}

.userProfile-wrapper{
    display: flex;
    gap: 24px;
    padding: 10px 6px 4px 6px;
    font-size: 12px;
    color: #343a40;
    text-align: left;
}

/* ---- left: photo and the data maintained by the administrator ---- */
.userProfile-left{
    flex: 0 0 250px;
    border-right: 1px solid #dee2e6;
    padding-right: 20px;
}

.userProfile-photoHolder{
    position: relative;
    width: 150px;
    height: 200px;
    margin: 0 auto 10px auto;
    border-radius: 75px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,.35);
    background: #e9ecef;
}

.userProfile-photo{
    width: 150px;
    height: 200px;
    object-fit: cover;
    display: block;
}

.userProfile-photoIcon{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46px;
    background: rgba(52,58,64,.65);
    text-align: center;
    opacity: 0;
    transition: opacity .2s;
}

.userProfile-photoIcon > img{
    width: 22px;
    height: 22px;
    margin-top: 8px;
    filter: invert(1);
}

.userProfile-photoHolder:hover .userProfile-photoIcon{
    opacity: 1;
}

.userProfile-name{
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    margin: 12px 0 10px 0;
    word-break: break-word;
}

.userProfile-facts{
    width: 100%;
    border-collapse: collapse;
}

.userProfile-facts th,
.userProfile-facts td{
    padding: 5px 2px;
    border-top: 1px solid #eef0f2;
    font-size: 12px;
    vertical-align: top;
    text-align: left;
    background: none;
}

.userProfile-facts th{
    width: 90px;
    font-weight: normal;
    color: #6c757d;
    white-space: nowrap;
}

.userProfile-facts td{
    word-break: break-word;
}

.userProfile-hint{
    margin-top: 10px;
    font-size: 10px;
    color: #868e96;
}

/* ---- right: the form ---- */
.userProfile-right{
    flex: 1 1 auto;
    min-width: 0;
}

.userProfile-viewOnly{
    display: none;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff8e1;
    border: 1px solid #ffe08a;
    color: #7a5d00;
}

.userProfile-section{
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6c757d;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 4px;
    margin: 4px 0 10px 0;
}

.userProfile-row + .userProfile-section{
    margin-top: 18px;
}

.userProfile-row{
    margin-bottom: 10px;
}

.userProfile-row2{
    display: flex;
    gap: 12px;
}

.userProfile-row2 > div:first-child{ flex: 0 0 130px; }
.userProfile-row2 > div:last-child { flex: 1 1 auto; min-width: 0; }

.userProfile-right label{
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    color: #495057;
}

.userProfile-right input[type=text]{
    box-sizing: border-box;
    width: 100%;
    height: 30px;
    padding: 4px 8px;
    font-size: 13px;
    color: #343a40;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 4px;
    outline: 0;
}

.userProfile-right input[type=text]:focus{
    border-color: #5babf2;
    box-shadow: 0 0 0 2px rgba(15,108,191,.25);
}

.userProfile-right input[type=text]:disabled{
    background: #f1f3f5;
    color: #495057;
}

.userProfile-phone{
    display: flex;
    gap: 6px;
}

.userProfile-phone > .select2-container{ flex: 0 0 120px; }
.userProfile-phone > input{ flex: 1 1 auto; min-width: 0; }

.userProfile-right .select2-container .select2-selection--single{
    height: 30px;
}

.userProfile-right .select2-container .select2-selection--single .select2-selection__rendered{
    line-height: 28px;
    font-size: 13px;
    text-align: left;
}

.userProfile-right .select2-container .select2-selection--single .select2-selection__arrow{
    height: 28px;
}

#userProfileDialog .select2-results__option{
    font-size: 12px;
    text-align: left;
}

.userProfile-error{
    display: none;
    margin-top: 3px;
    font-size: 11px;
    color: #c92a2a;
}

.userProfile-left .userProfile-error{
    text-align: center;
}

.userProfile-invalid input[type=text],
.userProfile-invalid .select2-selection{
    border-color: #e03131 !important;
}

/* view-only */
.userProfile-readonly .userProfile-photoHolder{ cursor: default; }
.userProfile-readonly .userProfile-photoIcon{ display: none; }

/* the cropper of js-src/ProfilePhotoEdit.js needs a height to fill */
.userProfile-cropper{
    height: 500px;
    box-sizing: border-box;
}

@media (max-width: 760px){
    .userProfile-wrapper{ flex-direction: column; }
    .userProfile-left{ flex: none; border-right: 0; padding-right: 0; }
}

@media (max-height: 700px){
    .ui-dialog.userProfile-dialog #userProfileDialog{
        overflow: auto;
        max-height: calc(100vh - 140px);
    }
}

.userProfile-readonly input::placeholder{ color: transparent; }


/* ---- tabs ---- */
.ui-dialog.userProfile-dialog #userProfileDialog{
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.userProfile-pane{
    flex: 1 1 auto;
    min-height: 0;
}

.userProfile-pane[data-pane="training"],
.userProfile-pane[data-pane="pass"]{
    display: flex;
    flex-direction: column;
}

.userProfile-tabs{
    flex: 0 0 auto;
    display: flex;
    gap: 2px;
    margin: 2px 0 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.userProfile-tabs button{
    padding: 7px 14px 6px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: #495057;
    font-size: 12px;
    cursor: pointer;
}

.userProfile-tabs button:hover{ color: #0f6cbf; }
.userProfile-tabs button.userProfile-tabOn{
    color: #0f6cbf;
    font-weight: bold;
    border-bottom-color: #0f6cbf;
}

.userProfile-pane[data-pane="training"],
.userProfile-pane[data-pane="pass"]{
    font-size: 12px;
    color: #343a40;
    text-align: left;
}

.userProfile-paneHead{
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.userProfile-paneNote{
    flex: 1 1 auto;
    color: #6c757d;
    font-size: 11px;
}

.userProfile-tblBox{
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 4px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.userProfile-tbl{
    width: 100%;
    border-collapse: collapse;
}

.userProfile-tbl th{
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 6px 8px;
    background: #f5f7fa;
    border-bottom: 1px solid #dee2e6;
    color: #6c757d;
    font-size: 11px;
    font-weight: normal;
    text-align: left;
}

.userProfile-tbl td{
    padding: 5px 8px;
    border-top: 1px solid #eef0f2;
    vertical-align: middle;
    background: none;
    font-size: 12px;
    text-align: left;
}

.userProfile-tbl td b{ color: #1f2d3d; }
.userProfile-from{ white-space: nowrap; width: 150px; }
.userProfile-act .userProfile-btn{ margin-left: 10px; }
.userProfile-rmk{ color: #868e96; font-size: 11px; white-space: pre-line; }

.userProfile-sn{
    display: inline-block;
    min-width: 34px;
    margin-right: 8px;
    padding: 0 5px;
    border-radius: 3px;
    background: #e7edf6;
    color: #365186;
    font-size: 10px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
}

.userProfile-req{
    display: inline-block;
    margin-left: 8px;
    padding: 0 6px;
    border-radius: 8px;
    background: #eef0f3;
    color: #6b7280;
    font-size: 9px;
    line-height: 15px;
}

.userProfile-exp{ white-space: nowrap; width: 150px; }
.userProfile-exp small{ display: block; font-size: 10px; opacity: .85; }
.userProfile-st_ok{ color: #11734b; }
.userProfile-st_due{ color: #8a5a00; font-weight: bold; }
.userProfile-st_bad{ color: #c92a2a; font-weight: bold; }

.userProfile-act{ white-space: nowrap; text-align: right !important; width: 1%; }
.userProfile-act a,
.userProfile-att a{
    margin-left: 10px;
    color: #0f6cbf;
    cursor: pointer;
    text-decoration: none;
    font-size: 11px;
}
.userProfile-act a:hover,
.userProfile-att a:hover{ text-decoration: underline; }
.userProfile-act a.userProfile-del{ color: #c92a2a; }
.userProfile-mono{ font-family: Menlo, Consolas, monospace; font-size: 11px; }

.userProfile-btn{
    height: 26px;
    padding: 0 12px;
    border: 1px solid #aab2bd;
    border-radius: 4px;
    background: #fff;
    color: #343a40;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
}
.userProfile-btn:hover{ background: #f1f3f5; }
.userProfile-btnMain{ border-color: #0f6cbf; background: #0f6cbf; color: #fff; }
.userProfile-btnMain:hover{ background: #0d5ea6; }

.userProfile-empty{
    padding: 24px 12px;
    color: #868e96;
    text-align: center;
}

/* ---- the dialogs of a new record / a passport ---- */
.userProfile-form{
    padding: 6px 4px 0 4px;
    font-size: 12px;
    color: #343a40;
    text-align: left;
}

.userProfile-form label{
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    color: #495057;
}

.userProfile-form label i{ color: #c92a2a; font-style: normal; }

.userProfile-form input[type=text],
.userProfile-form select,
.userProfile-form textarea{
    box-sizing: border-box;
    width: 100%;
    min-height: 30px;
    padding: 4px 8px;
    font-size: 13px;
    color: #343a40;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-family: inherit;
}

.userProfile-form input:disabled{ background: #f1f3f5; color: #868e96; }
.userProfile-form textarea{ resize: vertical; }
.userProfile-form .userProfile-row2 > div:first-child{ flex: 1 1 0; }
.userProfile-form .userProfile-row2 > div:last-child{ flex: 1 1 0; }

.userProfile-form label.userProfile-check{
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #343a40;
    cursor: pointer;
}

.userProfile-hintLine{
    margin-top: 4px;
    color: #6c757d;
    font-size: 11px;
}

.userProfile-att{ margin-bottom: 4px; color: #495057; }
.userProfile-att:empty{ display: none; }
.userProfile-gone{ color: #c92a2a; }

@media (max-width: 760px){
    .userProfile-tabs button{ padding: 7px 8px 6px 8px; }
    .userProfile-paneHead{ flex-wrap: wrap; }
    .userProfile-exp{ width: auto; }
}
