/* Extracted from legacy rdp.css: component section */
/****COMMON*******************************************/

div{vertical-align: top;}
p{
    padding: 0px 0px 0px 0px;
    margin: 0px 0px 0px 0px;       
} 
a{color: #336699;cursor:pointer;}
span.selected{color:rgb(110,110,110);font-weight: bold; background-color: rgba(210,225,230,0.9);border-radius: 5px; padding:0.2vh;;padding-left:0.6vw;padding-right: 0.6vw;}
h2{margin:5px;text-align:center;font-size:110%;font-weight:bold;color:rgb(80,80,80);text-decoration:none}
h3{margin:5px;text-align:center;font-size:110%;font-weight:bold;color:rgb(80,80,80);text-decoration:none}
h4{margin:5px;text-align:center;font-size:100%;font-weight:bold;color:rgb(100,100,100);text-decoration:underline}
hr{border: 1px solid #a7a7cc; margin: 3px auto;}
/******FORMS & CONTROLS *******************************************************/
form table{
    margin: 2px auto; 
}
form table td{
    padding: 5px 5px 0px 0px;  
    text-align:left;  
    vertical-align:middle;
}
form{margin:0px auto;}/*usually margin>0*/

fieldset {border:1px dotted gray; border-radius: 3px;margin:5px; padding:5px; box-shadow:1px 1px 1px 1px }

input,select,textarea,submit{margin: 0px auto;height:22px;border-radius: 3px;}
input[type=radio],input[type=checkbox] {
    vertical-align: middle;
    display: inline-block;
    position: relative;    
    padding: 0px auto;margin:0px auto;
    background-color: #ffffff;
    border: 1px solid #cacece;    
    border-radius: 3px;
}
input[type=submit],input[type=button],button{
    background-color:rgb(155,185,200);
    margin:auto;
    /*margin-top:5px;padding-top:5px;*/
    border-top: 1px solid rgb(190,220,235);
    color: rgb(0,0,0);
    text-align: center;
    font-size: 100%;
    border-radius: 5px; 
}
input[type=date]::-webkit-clear-button {
    -webkit-appearance: none;/* turn off default browser styling */
    display: none;/* Hide the button */
}
/*
input[type=date]::-webkit-calendar-picker-indicator{display: none; -webkit-appearance: none; }
*/
.sv_input{color:#0033cc;}
.sv_label{color:#0033cc;cursor:pointer}
.sv_input.sv_changed{background-color:#dedeff;color:#000020;}
.sv_required{color:#954120 ;}
.sv_input_placeholder{
    color:#0033cc;text-decoration:underline; cursor:pointer;
}

.ctrl_panel{
    order:0;
    width:100%;margin-top:2px;margin-bottom:2px; text-align:left;padding:4px;padding-left: 10px;border-radius: 7px;
    border:1px dotted grey;background-color:#EEE; 
}

select option{
    color:#777777;
    background-color: #222222;
    background: #ffffff;
}
select option[selected=selected] {
    margin-left:12px;
    /*border:1px #00f solid;*/
    color:#ffffff;
    background-color: #2222ff;
    font-weight: bold;
}


.completion_bar{ 
    box-shadow: 2px 2px 3px grey;display:inline-block;vertical-align:middle;min-width:10vw;min-height:1vh;border:1px solid grey;
} 
.completion_bar>div{
    float:left;display:inline-block;min-height:1vh;background-color:rgb(190,255,140);
}

.main_box{/*centered shadowed main   box ie login*/
    display:inline-block; margin:0px auto;padding: 10px;background-color: rgb(250,250,250); border:1px dotted grey; border-radius: 5px; box-shadow: 4px 4px 10px 1px rgb(230,230,200);
}

/****** SHOWABLE SECTIONS *****************************************************/
.sv_pseudo_details .header { 
    /*background-color: rgb(220,235,240);*/
    margin:auto;margin-top:2px;
    width:100%;
    text-align:center;
    background-color: rgba(210,235,245,0.3);
    border-style: outset;    
    border-color: rgb(210,235,245);
    border-width: 3px;
    border-radius: 7px;  
    padding: 0px;
}
.sv_pseudo_details>.body {border: 1px solid rgb(220,235,240);border-radius: 4px; padding: 5px; margin: 2px auto;}
.sv_pseudo_details .header span{
    font-variant-caps: small-caps;color:#336699;cursor:pointer;
}
/****** UPDATE FORMS RELATED *****************************************************/
/*main detail form:*/
#mainform_container{/*replaced after post of main form. contains title etc and the form itself) */
    background-color: rgb(210,225,230);
    margin:auto;margin-top:2px;width:100%;
    border-style: solid;
    border-color: rgb(210,225,230);
    border-width: 1px;
    border-radius: 7px; 
    padding: 0px auto;    
}
.form-header,.form-footer{
    display: flex;flex-direction: row;justify-content: center;
    width:100%;margin:0px auto; padding: 0;    
}
.form-content{/*2/3 under mainform_container: actual form */    
    background-color: rgb(220,235,240);
    margin:0px 3px 0px 3px; 
    border-radius: 3px; 
    border: 5px solid rgb(220,235,240);;
    padding: 5px 5px 5px 5px;
    overflow:auto;  
}
.form-footer{padding-top:2px;}/*3/3 under mainform_container: errors etc */
/*subform/subforms: */
#subform_target{overflow:scroll }/*where subform_container is loaded into*/
#subform_container{/*contains subform or subforms, replaced after post of any of them */
    width:98%;background-color: rgb(220,235,240);
    margin:auto;margin-top:2px;
    border-style: solid;
    border-color:rgb(200,215,220);
    border-width: 1px;
    border-radius: 7px; 
    padding: 0px 3px 3px 3px;    
}
.subform-header,.subform_footer{
    background-color: rgb(220,235,240);border-color:lightgray;
}
.subform_footer{padding: 5px;}
form:not(.sv_changed) .show_changed{display:none;}
form.sv_changed .show_changed{display:inline;}
.sv_error,.sv_warning,.sv_info {
    color:#860000 ;
    font-weight: bold;font-size: 80%;
    border-radius: 5px; 
    background-color:#e4b9c0;    
    padding:7px;
    box-shadow: 3px 3px 5px grey;
    text-align: left;
    z-index:5;
    margin:5px auto;
    width: fit-content;
}
.sv_warning{color:#2b2b2b;background-color: #fdf5ce;}
.sv_info{color:darkblue  ;background-color:paleturquoise;}
/****TEXT & format ***************************/ 
.title{font-color:rgb(0,0,0);font-weight: bold; text-align:center;}
.subtitle{text-align:center;font-size:100%;font-weight:bold;color: rgb(110,110,110);text-decoration:underline}

/*PSEUDOTABLE for multiple forms */
.forms_table{display:table;border-collapse:separate;margin:3px auto}
.forms_thead{display:table-header-group;}
.forms_thead .forms_td{text-align:center;}
.forms_tbody{display:table-row-group;}
.forms_tr{display:table-row;}
.forms_td{display:table-cell;vertical-align:top;text-align:center;margin-left:auto;margin-right:auto;border:1px dotted #a7a7cc;}

.icon_button:hover{cursor: pointer;display:inline;}
.forms_tr.new_line .icon_button.save{display:none;}
.forms_tr.new_line .icon_button.delete{display:none;}
.forms_tr:not(.new_line) .icon_button.add{display:none;}
.forms_tr.new_line .forms_td{padding-top:10px;}
.icon_button{width:2.2vw;height:2.2vw;background-size: 2vw 2vw;background-position: center;background-repeat: no-repeat; }
.icon_button.save {width:22px;height:22px;background-size: 16px 16px; background-image: url('/images/save.png');}
.icon_button.delete {width:22px;height:22px;background-size: 16px 16px; background-image: url('/images/delete.png');}
.icon_button.add {width:22px;height:22px;background-size: 16px 16px; background-image: url('/images/add.png');}
.icon_button.undo {width:22px;height:22px;background-size: 16px 16px; background-image: url('/images/undo.png');}
.icon_button.help {width:22px;height:22px;background-size: 16px 16px; background-image: url('/images/question_mark_22.png');}
.icon_button.rightarrow{width:22px;height:22px;background-size: cover;background-image: url('/images/arrow_right_peppermint.png');}
.icon_button.refresh{width:22px;height:22px;background-size: cover;background-image: url('/images/refresh.png');}
.icon_button.graph{width:22px;height:22px;background-size: cover;background-image: url('/images/graph.png');}
.icon_button.table{width:22px;height:22px;background-size: cover;background-image: url('/images/table.png');}
.icon_button.download{width:22px;height:22px;background-size: cover;background-image: url('/images/download.png');}
.icon_button.logout{width:22px;height:22px;background-size: 16px 16px;background-image: url('/images/arrow_right_peppermint.png');}

.preview_table{
  margin-top: 20px;
  margin-bottom: 40px;
  border-collapse: collapse;
  border-spacing: 0;
  /*width: 100%;*/
}
.preview_table td {
  border:1px c7ddef solid ;
  text-align: left;
  padding: 8px;
  color:rgb(25, 25, 112);
}
.preview_table tbody tr:nth-child(even) {
  background-color: #f2f2f2
}

.preview_table th {
        position: sticky;
        top: 0;
        z-index: 2;
        background-color: #c7ddef;
    font-weight: bold;
    text-align: center;
}
/******BREADCRUMBS*******************************************************/
button.breadcrumbs_button{
    width:20px;height:20px;
    background-image: url('/images/actions.gif'); 
}
.breadcrumbs_popup{
    display:none;position:absolute;z-index:10;background-color: rgb(255,255,255);border-radius:5px;opacity:0.9;margin:2px;padding: 5px 5px 5px 5px;box-shadow: 8px 8px 8px 0 rgba(0, 0, 0, 0.7);    
}
ul.breadcrumbs{
    list-style-image:url('/images/arrow_right_peppermint.png'); 
    list-style-type: circle;
    list-style-position: inside;
    padding-left: 1vw;
}
ul.breadcrumbs> li{
    color:#336699 ;margin-bottom: 6px;
    font-weight: bold;font-size: 80%; 
    padding-left: 1vw;
}
/******SVTREE*******************************************************/

.sv_node{
    cursor:pointer; 
    margin:0px 0px 0px 0px ;     
    padding:0px 0px 4px 0px;
    list-style-image: none; 
    list-style-type: none; 
    list-style-position: inside;    
}
.sv_node.sv_collapsed {list-style-image: url('/images/SV/expand-large.gif');}
.sv_node.sv_expanded {list-style-image: url('/images/SV/collapse-large.gif');}

.sv_node>ul{
    margin : 2px 2px 2px 6px;    
    padding: 0px 0px 0px 6px;   
    border-left: 1px solid lightgrey;  
    position:relative;
}
.sv_node>ul:after {
  content:''; 
  width:60px; 
  height:1px; 
  left:0px;
  background:solid lightgrey; 
  position:absolute; 
  bottom:-px;
}

.sv_node.sv_selected{background-color: rgb(220,220,220);}
.sv_node.sv_selected>span{background-color: rgb(230, 245, 250);}
.sv_node.sv_focused>span{font-weight: bold;}

.sv_node span{font-size: 100%;}


/******MISC *******************************************************/

/*GRAPHIC ELEMENTS*/
.sv_loader {
    border: 16px solid #f3f3f3; /* Light grey */
    border-top: 16px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 1vw;
    height: 1vw;
    animation: spin 2s linear infinite; 
}
@keyframes spin { 
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sv_loader_round {
    border: 4px solid #e6edf2;
    border-top: 4px solid #5d9ecf;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.9s linear infinite;
    display: inline-block;
}

.sv_loader_linear {
    position: relative;
    width: 100%;
    height: 4px;
    overflow: hidden;
    background: #e7eef4;
    border: 1px solid #c8d7e4;
    border-radius: 2px;
}

.sv_loader_linear::before {
    content: '';
    position: absolute;
    top: 0;
    left: -35%;
    width: 35%;
    height: 100%;
    background: #4b8fc1;
    animation: sv_loader_linear_move 0.9s linear infinite;
}

@keyframes sv_loader_linear_move {
    0% { left: -35%; }
    100% { left: 100%; }
}

/* Workspace records layout (legacy look without inline styles) */
.workspace-records-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 1rem;
    min-height: 75vh;
}

.workspace-records-sidebar {
    flex: 0 0 22rem;
    width: 22rem;
    min-width: 18rem;
    max-width: 22rem;
}

.workspace-records-content {
    flex: 1 1 auto;
    min-width: 0;
}

.workspace-tree-panel {
    border: 1px solid lightblue;
    border-radius: 5px;
    padding: 0.4rem 0.5rem;
    background: #fff;
    font-size: 0.92em;
}

.workspace-tree-filter-panel {
    margin-bottom: 0.5rem;
}

.workspace-tree-filter-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.workspace-tree-label-cell {
    padding: 1px 4px 1px 0;
    white-space: normal;
}

.workspace-tree-value-cell {
    padding: 1px 0;
}

.workspace-tree-code-input {
    width: 100%;
    max-width: 14ch;
}

.workspace-tree-center-select {
    width: 100%;
    max-width: 18ch;
}

.workspace-tree-loading {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 5;
    margin: 0;
    pointer-events: none;
}

.workspace-tree-add-node .icon_button {
    margin-right: 0.35rem;
    vertical-align: middle;
}

.workspace-tree-scroll {
    position: relative;
    max-height: 70vh;
    overflow: auto;
}

.workspace-tree-empty {
    color: #666;
    padding: 0.25rem 0;
}

.workspace-tree-root-list {
    margin: 0;
    padding-left: 0;
}

.workspace-tree-root-list .sv_node.sv_collapsed,
.workspace-tree-root-list .sv_node.sv_expanded {
    list-style-image: none;
}

.workspace-tree-toggle,
.workspace-tree-toggle-spacer {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.workspace-tree-toggle {
    border: 0;
    padding: 0;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.workspace-tree-toggle-collapsed {
    background-image: url('/images/SV/expand-large.gif');
}

.workspace-tree-toggle-expanded {
    background-image: url('/images/SV/collapse-large.gif');
}

.workspace-single-form {
    position: relative;
    width: 99%;
    border: 1px solid lightblue;
    border-radius: 5px;
    padding: 2px;
}

.workspace-single-form-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.45);
    z-index: 30;
    pointer-events: none;
}

.workspace-single-form-header {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.workspace-single-form-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    align-items: center;
}

.workspace-single-form-actions .icon_button {
    flex: 0 0 auto;
}

.workspace-single-form-header-row {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
}

.workspace-single-form-left {
    flex: 0 0 20%;
    text-align: left;
}

.workspace-single-form-center {
    flex: 0 0 60%;
    text-align: center;
}

.workspace-single-form-right {
    flex: 0 0 20%;
    text-align: right;
}

.workspace-single-form-panel {
    margin: 12px;
    min-height: 300px;
}

.workspace-single-form-panel.form-content {
    background-color: transparent;
    border: 0;
    padding: 0;
}

.workspace-patient-header-cell {
    text-align: center;
}

.workspace-patient-pseudo-box {
    margin: 10px auto;
    border: 1px solid grey;
    padding: 5px;
}

.workspace-patient-short-input {
    width: 10em;
}

.workspace-patient-warning {
    position: relative;
    z-index: 5;
    top: 2px;
    left: 8px;
    display: block;
}

.workspace-patient-full-input {
    width: 100%;
}

.workspace-patient-oldcenters-toggle {
    height: 14px;
}

.workspace-patient-oldcenters-target {
    display: none;
    border: 1px solid graytext;
    overflow: auto;
    width: 100%;
}

.workspace-patient-comorbidities-input {
    width: 50vw;
    height: 20vh;
}

.icon_button {
    border: 0;
    padding: 0;
}


/*******TABS*******************************************************/
ul.sv_tabs{
    list-style-type: none;
        margin: 0px auto;
        padding: 0px;
        overflow: hidden;        
}
.sv_tabs>li{
    float:left;margin-right:4px;
    background-color: rgb(244,244,244);
    border: 1px dotted lightsteelblue;  
    border-top-left-radius: 3px;border-top-right-radius: 9px;
    padding: 2px 5px 2px 5px ;
}
.sv_tabs>li.sv_selected{
    background-color: rgb(220,235,240);
    border: 1px solid lightgray; border-bottom-color: rgb(220,235,240);
}

/* Language flag icons */
.icon_flag {
    display: inline-block;
    width: 22px;
    height: 15px;
    border-radius: 3px;
    background-color: #4f9d4f;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.icon_flag.it {
    background-image: url('/images/flag-it.png');
}
.icon_flag.en {
    background-image: url('/images/flag-en.png');
}




