/* === Base Layout: Full-screen, Centered === */
:root {
    --site-color: #4169E1;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: Arial, sans-serif;
    font-size:16px;
    /*color: #4169E1;*/
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main {
    display: flex;
    flex-direction: column;
    max-height: 95vh;
    width: 95%;
    max-width: 1200px;
    padding: 20px;
    box-sizing: border-box;
    gap: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    overflow: hidden;
    font-size: inherit;
}

#topbar {
    /*background-color: #4169E1;*/
    height: clamp(40px, 10vh, 40px);
    display: flex;
    justify-content: space-between; /* Ensures space between left and right */
    align-items: center;
    padding: 0 clamp(10px, 2vw, 20px);
    gap: clamp(5px, 1vw, 10px);
    font-weight: bold;
    border-radius: 5px;
    color: #fff;
    /*font-size: clamp(0.8rem, 2vw, 1.2rem);*/
}

#topbar .left-message {
    /*font-size: clamp(1rem, 2vw, 1.2rem);*/
    text-align: left; /* Align the left message */
    padding: 0 clamp(10px, 2vw, 20px);
    gap: clamp(5px, 1vw, 10px);
    font-weight: bold;
    border-radius: 5px;
    color: #fff;
}

#topbar .logout-link {
    margin-left: auto;  /* This forces the logout link to the far right */
   /*font-size: clamp(0.5rem, 0.75rem, 1.2rem);*/
    color: #fff;
}

#topbar .logout-link a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    height: clamp(40px, 5vh, 60px);
    padding: 0 clamp(10px, 2vw, 20px);
    gap: clamp(5px, 1vw, 10px);
}

/* === Image Block === */
#image-block {
    display: flex;              /* horizontally stack image and text */
    align-items: center;        /* vertically center the content (image and text) */
    justify-content: flex-start; /* left-align the content */
    gap: 10px;                  /* space between image and text */
    width: 100%;                /* take full width of the parent container */
    text-align: left;           /* keep the text left-aligned */
}

#image-block img {
    height: 80px;               /* adjust image size */
    width: auto;
}

#welcome-text {
    font-size: clamp(1rem, 2vw, 1.5rem); /* responsive text size */
    font-weight: bold;
    /*color: #4169E1;*/
    text-align: left;           /* left-align the text next to the image */
}


/* === Info Panel === */
#info-panel {
    height: clamp(300px, 77vh, 10000px);
    background: #EAEAEA;
    padding: clamp(10px, 2vw, 20px);
   /* border: 1px solid #4169E1;*/
    /*overflow-y: auto;*/
    /*font-size: clamp(0.4rem, 0.7vw, 1rem);*/

    display: flex;
    flex-direction: column;
    position: relative;    /* ensures sticky works inside */
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;   /* IMPORTANT: allows flexbox children to scroll correctly */
    scrollbar-gutter: stable both-edges;
    font-size: 0.8rem;
    color: #616161;

}

/* tables inside info-panel to inherit font-size clamp */
#info-panel table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* allow flexible resizing */
    /*table-layout: auto; allow flexible resizing */
    white-space: nowrap;
    /*word-wrap: break-word;*/
    /*font-size: inherit; */  /*pick up #info-panel’s clamp */
    font-size: 0.8rem;
    color: #616161;


}

#info-panel th, td {
    text-align: left;
    padding: 4px;
    /*color: rgba(102, 102, 102, 0.87);*/
    overflow: hidden;         /* prevents content overflow */

}

th.list {
    border: 1px solid #D3D3D3;
}

td.list {
    border: 1px solid #D3D3D3;
}

#info-panel input, select {
    border-radius: 12px;
    box-sizing: border-box;
    padding: clamp(5px, 0.8vw, 10px);


}

.list {
    /*font-size:0.8rem;*/

}




/* === Buttons at the bottom of the Info Panel === */

.info-buttons {
    /*flex-shrink: 0;  */       /* stays fixed at bottom */
    display: flex;
    justify-content: flex-start;
    cursor: pointer;
    /* 🔹 Sticky magic */
    position: sticky;
    bottom: 0;
    /*z-index: 10;*/ /* stays above scrolling form content */

    height: clamp(35px, 5vh, 60px);
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    gap: clamp(5px, 1vw, 10px);
    padding: 0 clamp(5px, 2vw, 10px);
}
/* 🔹 Buttons style */
.info-buttons .standard {
    border-radius: 12px;
    cursor: pointer;
}

button.standard {
    height: clamp(35px, 5vh, 60px);
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    gap: clamp(5px, 1vw, 10px);
    padding: 0 clamp(5px, 2vw, 10px);
    border-radius: 12px;
    cursor: pointer;
}




/* === Bottom Navigation === */
.bottom-nav {
    /*background: #4169E1;*/
    /*height: clamp(35px, 5vh, 60px);*/
    height: clamp(40px, 5vh, 60px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center items horizontally */
    align-items: center;
    font-weight: bold;
    /*font-size: clamp(0.65rem, 1vw, 0.8rem);*/
    /*font-size: clamp(0.8rem, 2vw, 1.2rem);*/
    border-radius: 5px;
    gap: clamp(5px, 1vw, 10px);
    /*padding: 0 clamp(5px, 2vw, 10px);*/
    padding: 0 clamp(10px, 2vw, 20px);
    /*overflow-x: auto;
    -webkit-overflow-scrolling: touch;*/
    color: #fff;
    position: sticky;
    bottom: 0;
    z-index: 9; /* slightly below buttons so they overlap if needed */
}


.bottom-nav div {
    flex: 0 0 auto;
    padding: clamp(3px, 0.5vw, 10px) clamp(5px, 1vw, 10px);
    border-right: 1px solid #005f87;
    white-space: nowrap;

}

.bottom-nav div:last-child { border-right: none; }

.hover-box {
    /*background-color: #eee;
    color: #333;*/
    /*padding: 1em;
    border-radius: 8px;*/
    text-align: center;
    transition: all 0.3s ease; /* smooth animation */
}

/* make the link fill the div area */
.hover-box a {
    display: block;        /* makes the <a> fill the div */
    color: inherit;        /* use the div’s text color */
    text-decoration: none; /* remove underline */
}


/* Active link color */
/*.bottom-nav a.active,*/
/*.bottom-nav a:hover {
    color: red;
}*/

/*.bottom-nav a:visited {
    color: white;
}*/

/* === Footer === */
#footer {
    height: clamp(20px, 3vh, 40px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: clamp(0.8rem, 1vw, 1rem);
}

/* === Buttons === */




/* === Responsive Form Fields === */

/*span.retmessage {
    color: #ccc;
}*/




/* === Input text specific CSS using id = "" === */
#pcode, #merchandisefeeid, #equiphirefeeid, #donationsfeeid, #facilitiesfeeid {
    width: clamp(20px, 10%, 200px);
}

/* general text fields - regular */
#idno, #zoneid, #cellno   {
    width: clamp(20px, 40%, 150px);
}

/* general text fields - long */
#firstname, #surname,  #email, #occupation,
#address,  #city, #suburb,
#assistpref1, #assistpref2, #assistpref3, #description,
#name, #description, #subject {
    width: clamp(20px, 100%, 400px);
}

/* super long field */
#emailtags {
    width: clamp(20px, 100%, 600px);
}

#gender, #sex {
    width: clamp(20px, 30%, 150px);
}

/* y/n, yes,no fields */
#yesnoSelect, #ynSelect, #sendtomember, #sendtochairman, #sendtoregofficer, #sendtoadmin {
    width: clamp(10px, 30%, 100px);
}

#statusSelect {
    width: clamp(10px, 100%, 300px);
}

    /* date fields  */
#addedDatetime, #changedDatetime, #dob  {
    width: clamp(20px, 30%, 150px);
}

/* qty fields */
#merchandiseqty, #equiphireqty, #facilitiesqty {
    width: clamp(10px, 20%, 50px);
}

/* amount fields */
#donationsamount, #amount, #regamt, #storamt, #extramt {
    width: clamp(20px, 50%, 100px);
}

/*#termsandcondstextarea {
    height: 100%;
    width:100%;
}*/


textarea {
  width: clamp(50px, 120vw, 1100px);  /*Min, Preferred, Max width*/
  height: clamp(50px, 80vh, 300px);  /*Min, Preferred, Max height*/
}

#searchfield {
    width: clamp(100px, 100%, 200px);
}
#searchstring {
    width: clamp(100px, 100%, 200px);
}

/* Table Responsive */
/* Container for scroll on very small screens */
.table-container {
    width: 100%;
    overflow-x: auto;
}


/* === Centered Message Box Overlay === */
#message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;

    /* Styling */
    max-width: 80%;
    padding: 20px 25px;
    border-radius: 10px;
   /* background-color: #fff4d9;
    border: 2px solid #e0b84a;
    color: #4a3b00;*/
    font-size: 1rem;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    text-align: center;
}

/* Fade-in active state */
#message-box.visible {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Hidden/fade-out state */
#message-box.hidden {
    display: none;
}

/* Clear button inside message box */
#message-box button.clear-btn {
    margin-top: 15px;
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
   /* background-color: #4169E1;*/
    /*color: white;*/
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/*#message-box button.clear-btn:hover {
    background-color: #274baf;
}*/

/* === Dimmed overlay behind message box === */
#message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9998; /* just below message-box */
    display: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

/* Shown state */
#message-overlay.visible {
    display: block;
    opacity: 1;
}

/* Hidden state */
#message-overlay.hidden {
    display: none;
}


/* === System Disable CSS === */
.disabled-div {
    /* Prevents all mouse interactions */
    pointer-events: none;

    /* Optional: Change appearance to indicate it's disabled */
    /*opacity: 0.5;*/
    cursor: not-allowed;

}

.disabled-div a {
    display: block;
    color: grey;
    text-decoration: none;
}

.due {
    color: red;
}

.disabled-link {
    pointer-events: none; /* Disables mouse clicks and other pointer interactions */
    cursor: default;     /* Changes the cursor from a hand icon to a default arrow */
    opacity: 0.5;        /* Optional: visually dims the link to indicate it is disabled */
    color: inherit;      /* Optional: inherits color from parent to avoid standard link color */
    text-decoration: none; /* Optional: removes the default underline */
}

/* === Small Screen Adjustments === */
@media (max-width: 480px) {
    .main { padding: 10px; gap: 10px; max-height: 90vh; }
    #info-panel { height: 60vh; }
    #welcome-text { font-size: 1rem; }
    .bottom-nav { font-size: 0.65rem; gap: 5px; }
    .bottom-nav div { padding: 3px 6px; }

    .info-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .info-buttons .standard {
        width:  100%;
    }

    #bottom-nav {
        flex-direction: column;
        align-items: center;
    }
}



