/* Removed body override to maintain main theme */

/* ==== Page-specific styles for Abacus ==== */
/* ==== Improved layout & themed buttons for Abacus ==== */
.container{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    width:100%;
    padding:20px;
}
.controls fieldset{
    border:none;
    padding:20px;
    background:var(--white);
    border-radius:10px;
    box-shadow:var(--shadow);
    margin:20px 0;
    width: 100%;
    box-sizing: border-box;
}
.controls label{
    font-weight:600;
    color:var(--secondary);
    margin-right:10px;
    display: inline-block;
}
select{
    padding:10px 15px;
    border:1px solid #ccc;
    border-radius:6px;
    font-size:1rem;
    margin-right:10px;
    margin-bottom: 10px;
    background:var(--white);
    min-width: 80px;
}

/* Responsive controls */
@media(max-width: 768px){
    .controls fieldset {
        padding: 15px;
        margin: 15px 0;
    }
    
    .control-group {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .control-group center {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    
    .controls label {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    select {
        width: 100%;
        max-width: 200px;
        margin-right: 0;
    }
    
    .button {
        width: 100%;
        max-width: 200px;
        margin: 5px 0 !important;
    }
}

@media(max-width: 480px){
    .controls fieldset {
        padding: 12px;
        margin: 12px 0;
    }
    
    select, .button {
        max-width: 100%;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}
.button{
    color:#ffffff;
    margin:0 15px;
    text-decoration:none;
    font-weight:600;
    transition:all .3s ease;
    padding:8px 16px;
    border-radius:6px;
    border:none;
    cursor:pointer;
    font-size:1rem;
    background-color:#1e3a8a;
}
.button:hover{
    background-color:#f97316;
    transform:translateY(-2px);
    box-shadow:0 4px 12px rgba(249, 115, 22, 0.3);
}
/* Sticky footer */
footer{
    margin-top:auto;
}

h1, h2 {
    color: #994c00;  
}

canvas {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        outline: none;
        -webkit-tap-highlight-color: transparent; /* mobile webkit */
        cursor: pointer;
        margin-top: 10px;
        width: 100%;        /* take full width of container */
        height: auto;       /* preserve aspect ratio */
        max-width: 100%;    /* never overflow horizontally */
        display: block;
        box-sizing: border-box;
}

/* Responsive canvas container */
#canvasdiv {
    width: 100%;
    margin: 0 auto;
    text-align: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    box-sizing: border-box;
}

@media(max-width: 768px){
    #canvasdiv {
        padding: 8px;
    }
    
    canvas {
        margin-top: 8px;
    }
}

@media(max-width: 480px){
    #canvasdiv {
        padding: 5px;
    }
    
    canvas {
        margin-top: 5px;
    }
}    

#footer {
        width:400px;
        margin-left: auto;
        margin-right: auto;
        font-size: 10px;
}

#controls {
        position: absolute;
        left: 60px;
        top: 25px;
}

/* Moved to responsive section above */
        
fieldset {
        border: 1px solid #663300;
        border-radius: 10px;
        padding: 5px;
}

legend {
        background-color: #994c00;
        border: 1px solid #663300;
        border-radius: 10px;
        padding: 5px 10px;
        text-align: left;
        color: #ffffff;
}

.settings {
        display: inline;
}

#showTime, #delay {
        width:50px;
}

#repeat {
        width: 60px;
}

/* Removed conflicting button styles - using themed button above */

.glass {
        
        padding: 0px 20px 10px 10px;
        background: rgba(0, 0, 0, 0.6);
        border: thin solid rgba(0, 0, 0, 0.6);
        color: #eeeeee;
        font-family: Droid Sans, Arial, Helvetica, sans-serif;
        font-size: 12px;
        cursor: pointer;
        -webkit-box-shadow: rgba(0,0,0,0.5) 5px 5px 20px;
        -moz-box-shadow: rgba(0,0,0,0.5) 5px 5px 20px;
        box-shadow: rgba(0,0,0,0.5) 5px 5px 20px;
        display:none;
}

#cookiespane {
    position:absolute;
    width:300px;
    left:50%;
    margin-left:-150px;
    bottom:10px;
    display:inline;
}

#glasspane {
    position: absolute;
    width:300px;
    left: 50%;
    margin-left:-150px;
    top: 50px;
}


#glasspane h2 {
        font-weight: normal;
}

#glasspane strong {
        color: sienna;
}

#glasspane .title {
        font-size: 2em;
        color: rgba(255, 255, 0, 0.8);
        text-align: center;
}

#glasspane p {
        margin: 10px;
        color: ivory;
        font-size: 12pt;
        font-family: Palatino, Arial, Helvetica, sans-serif;
        text-align: center;
}

#messageOkButton, #cookiesOKButton, #cookiesKOButton {
        float:right;
}