/* 
Micropipette CSS

--------------------------------------- */
body, html { overflow-x: hidden; }
body {
    font-size: 1em;
    line-height: 1.4;
    /* margin-left: 15%;
    margin-right: 15%; */
        background: linear-gradient(180deg, #cfe8e1 50px, #e4f3ee 560px, #f3faf7 860px) no-repeat;
    background-color: #f3faf7;
    font-family: "Open Sans", Roboto, Arial, sans-serif;
    font-style: normal; 
    -webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
    -webkit-text-size-adjust: 100%;
}


.top_titlebar
{
    align-items: center;
    height: 50px;
    width: 100%;
    border-bottom:#155726 2px solid;
    box-shadow: #155726 ;
    /*border-left:#155726 2px solid;
    border-right:#155726 2px solid;
    */
}

.top_btn
{
    margin-top: 5px;
    display: flex;
    text-align: center;
    align-items: center;
    background-color: #155726 ; 
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-size: 2em;
    color: white;
    
}
.game-name
{
    /* margin-top: 200px; */
    align-items: center;
    display: flex;
    justify-content: center;
}

.setting-section {
  height: auto;
  overflow: visible;
    width: 100%;
    align-items: center;
    justify-content: center;
    /* background: #fceae8; */
    position: relative;
}
/* 
.btn-game-start
{
    
    position: relative;
    display: flex;
    text-align: center;
    align-items: center;
    background-color: #155726 ; 
    font-family: "Open Sans", Roboto, Arial, sans-serif;
    font-size: 1em;
    color: white;
} */

.vertical-center
{
    margin-top: 40px;
    align-items: center;
    display: flex;
    justify-content: center;

}

.canvas-area
{
    /* margin-top: 10px; */
    align-items: center;
    display: flex;
    justify-content: center;
    /* min-width:100%; */

}

.resultsBarLabel {
    font-size: 9px;
    margin-top: 0px;
}
#resultsBar {
  display: block;
  clear: both;
  height: auto !important;
	margin: 0 auto;
	align-items: center;
    justify-content: center;
	text-align:center;
    max-width: 300px;
    /*border: 2px solid black;*/
}

#scoreColumn {
    width: 90px;
    float: left;
}
#txtScore{
    font-family: Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New", "monospace";
    font-size: 30px;
    font-weight: bold;
    height: 30px;
}
 #timerColumn {
    float: left;
    width: 40px;
}
#timerCanvas {
    height: 30px;
    width: 30px;
}
#levelColumn {
    float: left;
    width: 80px;
}
#levelCanvas {
    height: 30px;
    width: 70px;
}
#strikesColumn {
    float: left;
    width: 100px;
}            
#txtStrikes {
    height: 30px;
}
#txtStrikes img {
    height: 30px;
    width: 30px;
}                        
.resultsBarLabel {
    font-size: 9px;
    margin-top: 0px;
}
#timerColumn .resultsBarLabel,
#levelColumn .resultsBarLabel {
    margin-top: -4px;
}


#questionBar {
    /* Keep in document flow so strike / out-of-range text does not cover dial labels */
    position: relative;
    min-height: 72px;
    height: auto;
    line-height: 1.15;
    width: 100%;
    left: auto;
    -webkit-transform: none;
    transform: none;
    z-index: 10;
    display: none;
    margin: 8px 0 4px;
}

#txtQuestion {
    width: 100%;
    text-align: center;
    min-height: 72px;
    height: auto;
}
#txtQuestion .questionInstruction{
    font-size: 20px;
    font-weight: bold;
    color: #000000;                
}
#txtQuestion .questionMeasurement{
    font-size: 30px;
    font-weight: bold;
    color: #000000;               
}
#txtQuestion .questionWrongInstruction{
    font-size: 20px;
    font-weight: bold;
    color: #f44336;                
}
#txtQuestion .questionWrongMeasurement{
    font-size: 30px;
    font-weight: bold;
    color: #f44336;               
}
#txtQuestion .gameOver{
    font-size: 35px;
    font-weight: bold;
    color: #8c2121; 
}            



#playerCanvas {
    position: absolute;
    /*background-color: #ffffff !important;*/
    z-index: 1;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    display:none;
}
/* 
#rulerCanvas {
    position: absolute;
    z-index: 2;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
} */

#rulerCanvas
{
   /* min-width:fit-content; */
   width: 100%; 
   
}

#myCanvas
{
    width: 100%;
}

#strikeBoard {
    margin-top: -250px;
    position: absolute;
    height: 80px;
    width: 240px;
    display: none;
    z-index: 3;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
}
#strikeBoard img {
    float: left;
    height: 80px;
    width: 80px;
}
#cheerBoard {
    position: absolute;
    height: 60px;
    width: 310px;
    margin-top: -62px;
    display: none;
    z-index: 4;
    text-align: center;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);                
}

.cheer{
    position: absolute;
    width: 100%;
    height: 60px;
    max-height: 60px;
    padding-top: 15px;
    font-size: 30px;
    color: purple;
    bottom: 0px;
}
.level {
    margin-top: 150px;
    position: absolute;
    width: 100%;
    height: 60px;
    max-height: 60px;                
    font-size: 50px;
    font-weight: 900;
    color: darkblue;
    bottom: 0px;
}

.settingsLabel {
    width: 150px;
}

#preferencesBox {
    width: 315px;
    /*border: 2px solid #000;
    background-color: #ffff99;
    padding: 3px;*/
    margin: auto;
    margin-top: 60px;
    overflow: auto;
    display: none;
    z-index: 5;
    position: absolute;
    left: 50%;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);                  
}
#timerBox, #soundsBox, #modeSelection
{
    height: 45px;

}


#buttonBar {
    position: relative;
    height: 60px;
    width: 300px;
    margin: 10px auto;
    left: auto;
    -webkit-transform: none;
    transform: none;
}

#btnStart,
#btnSettings {
    background-color: #8c2121;
    color: white;
    border: 0;
    border-radius: 5px;
    height: 40px;
    width: 140px;
    font-size: 24px;
    margin: 10px auto 10px auto;
    cursor: pointer;
}

#btnSettings {
    float: right;
}

#btnStart,
#btnSettings,
#btnSubmit {
    background-color: #1f6f63;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.08) 6px,
        transparent 6px,
        transparent 12px
    );
    color: white;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
}

#btnStart:hover,
#btnSettings:hover,
#btnSubmit:hover {
    background-color: #17564d;
}

#btnSubmit {
    height: 40px;
    width: 210px;
    font-size: 24px;
}

#submitColumn
{
    /* float: right; */
    /* float: center; */
    
    /* width: 300px; */
    /* height: 40px; */
    margin-left: auto;
    margin-right: auto;

}

#displayBoard
{
    /* margin: auto; */
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
}


#detailedControl
{
    height: fit-content;
    /* background-color: #fceae8; */

}

#instructionsBox {
max-width:1100px;
margin:auto;
}

.split-screen-layout {
  display: flex;
  flex-wrap: wrap;
}

.section {
  padding: 15px;
}
.section #resultsBar{
    width:100%;
}

/* Default: Sections take full width */
.section {
  width: 100%;
}

.section #canvasArea{
    position:relative;
}
.section #displayBoard{
    justify-content: left;
}
.section #submitColumn{
    margin-top:30px;
}
.typecanvs-area{
    text-align:center;
    margin-top: 50px;
}
.section #detailedControl{
    margin-top: 12px;
}

.nametwocolumn{
	margin: 0 auto 10px auto;
	max-width: 280px;
	text-align:left;
	}
	
/* Add styles for disabled submit button */
#btnSubmit:disabled {
    background-color: #cccccc !important;
    color: #666666 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

#btnSubmit:disabled:hover {
    box-shadow: none !important;
}

.natspinner {
    width: 24px;
    height: 24px;
    border: 5px solid #000000;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    }

    @keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
    }

@media screen and (min-aspect-ratio: 1/1) and (orientation: landscape) {
	#submitColumn {
  text-align: left !important;
}

.w3-center {
  text-align: left !important;
}
	
    #preferencesBox {
    left: 35%;              
    }	
	
    .section .canvas-area{
        justify-content:end;
    }
    .section-60 {
        width: 60%;
    }
    .section-50 {
        width: 50%;
    }
    .section-40 {
     width: 40%;
    }
    #verniersmall{
      max-width: 390px;
    }
    #labelverniersmall{
        text-align:left;
    }
    .typecanvs-area{
        text-align:left;
    }
    .section .number-input{
        justify-content:start;
    }
    
    .setting-section
    {
        height: unset;
    }
    
    .section #buttonBar{
        position: relative;
         margin: 0;
         left: auto;
         -webkit-transform: none;
         transform: none;
         height: auto;
         min-height: 60px;
    }
    .section #questionBar{
         position: relative;
         height: auto;
         min-height: 60px;
         line-height: 1.15;
         width: 100%;
         left: auto;
		 text-align:left;
         -webkit-transform: none;
         transform: none;
         z-index: 10;
    }
	
	#txtQuestion {
    width: 100%;
    text-align: left;
    height: auto;
    min-height: 60px;
}
	
	.section #detailedControl{
        margin-top:0;
    }
	#resultsBar {
    margin: 20px 0 20px 0;
	text-align:left;
    max-width: 500px;
    /*border: 2px solid black;*/
    }
    .nametwocolumn{
        max-width: 280px;
        margin: 0 auto 10px 20px;
        text-align: left;
        }
    .typecanvs-area {
        margin-top: 0;
    }
	
	/* Align micropipette container and all 4 sliders to the left */
    .micropipette-game-layer,
    .micropipette-dial-sliders,
    .dial-three-row,
    .dial-vernier-row {
        margin-left: 0 !important;
    }
}

/* 
Micropipette Game CSS specials (appended)
--------------------------------------- */

#micropipetteDisplay { max-width: 480px; margin: 0 auto; }
.micropipette-summary { font-size: 0.95rem; }

.pipette-top-badge {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.pipette-badge-circle {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e8f4fc 0%, #7eb8d6 45%, #4a8caf 100%);
    border: 3px solid #2a5f7a;
    box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.35), 0 3px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pipette-badge-inner {
    font-size: 0.65rem;
    font-weight: 700;
    color: #1a4a5e;
    letter-spacing: 0.05em;
}

.pipette-badge-code {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0d2d3d;
    line-height: 1.1;
}

.micropipette-shaft-wrap { padding: 0 4px; }

.micropipette-illustration {
    position: relative;
    width: 100%;
    height: 220px;
    border: 2px solid #333;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
}

.gilson-style .micropipette-illustration {
    background: linear-gradient(to bottom, #fbf8f8 0%, #e8e4e4 55%, #c8c4c4 100%);
}

.eppendorf-style .micropipette-illustration {
    background: linear-gradient(to right, #f2f3f5 0%, #e5e7eb 50%, #d1d5db 100%);
}

.pipette-shaft-body {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: 48px;
    height: 72%;
    background: linear-gradient(to right, #9ca3af, #d1d5db 40%, #9ca3af);
    border-radius: 4px 4px 2px 2px;
    border: 1px solid #6b7280;
    box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.2);
}

.pipette-volume {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    background: linear-gradient(to top, #2f7fa5 0%, #5cb4d7 60%, transparent 100%);
    border-radius: 2px;
    height: 5%;
    transition: height 0.15s linear;
    z-index: 1;
}

.pipette-digits {
    position: absolute;
    right: 8px;
    top: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    z-index: 2;
}

.gilson-style .pipette-digits {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.gilson-style .digit-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 26px;
    padding: 0 4px;
    background: #f3f4f6;
    border: 1px solid #9ca3af;
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.gilson-style .digit-cell.digit-dot {
    min-height: 12px;
    font-size: 1.4rem;
    line-height: 0.5;
    padding-bottom: 4px;
}

.gilson-style .digit-cell.digit-placeholder { color: #9ca3af; }
.digit-cell.digit-red { color: #c62828; font-weight: 900; }

.eppendorf-style .pipette-digits {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    right: 10px;
    top: 24px;
}

.eppendorf-style .digit-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 28px;
    padding: 0 3px;
    background: #f9fafb;
    border: 1px solid #6b7280;
    border-radius: 2px;
}

.eppendorf-style .digit-cell.digit-dot {
    min-width: 8px;
    font-weight: 900;
}

.micropipette-dial-sliders {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 8px 0 12px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Top / Middle / Bottom dials stacked vertically for easier precise input */
.dial-three-row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 14px;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.dial-vernier-row {
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.dial-vernier-block {
    flex: 1 1 auto;
    max-width: 100%;
}
.dial-slider-block {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
}
.dial-slider-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    text-align: left;
    margin-bottom: 4px;
    line-height: 1.2;
}
.dial-slider-input {
    width: 100%;
    display: block;
    height: 32px;
}
.dial-slider-readout {
    text-align: left;
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 2px;
    color: #111;
}

#volumeDial0Val, #volumeDial1Val, #volumeDial2Val, #volumeDial3Val { display: none; }



.pipette-rack-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.pipette-rack-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #333;
    background: radial-gradient(circle at 35% 30%, #e8f4fc 0%, #7eb8d6 45%, #4a8caf 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.pipette-rack-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.pipette-rack-circle .rack-code {
    font-size: 0.65rem;
    font-weight: 800;
    color: #0d2d3d;
    line-height: 1.1;
    text-align: center;
}

#pipetteRack button.selected {
    background: radial-gradient(circle at 35% 30%, #dbeafe 0%, #3b82f6 50%, #1d4ed8 100%);
    border-color: #1e40af;
    color: #fff;
}

#pipetteRack button.selected .rack-code { color: #fff; }

.mp-canvas-row {
    position: relative;
    width: 100%;
    max-width: 404px;
    margin: 0 auto 10px;
    flex-shrink: 0;
}

.micropipette-game-layer {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 2;
    margin: 0 auto; /* Added to center the entire game block */
}

.natspinner {
    width: 24px;
    height: 24px;
    border: 5px solid #000000;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: micropipette-spin 1s linear infinite;
}

@keyframes micropipette-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*
Layout stability
Play Game / Settings (buttonBar) and the question (questionBar) share one fixed footprint, tall enough
for the wrong-answer text, so the controls below do not jump on Play, on a strike, or at game over.
Lower --qbar-h for less empty space (a long strike message may then push things down a little).
--------------------------------------- */
.setting-section {
    --qbar-h: 118px;
}

/* Narrow columns wrap the longer messages onto an extra line. */
@media screen and (max-width: 900px) {
    .setting-section {
        --qbar-h: 140px;
    }
}

.section #buttonBar,
.section #questionBar {
    box-sizing: border-box;
    height: auto;
    min-height: var(--qbar-h);
    margin-top: 8px;
    margin-bottom: 4px;
}
