/* ================================
   1. GLOBAL PAGE GEOMETRY
   ================================ */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #000; /* fallback */
    font-family: Arial, sans-serif;
}

/* Fixed 1440px page container, centered */
#page-container {
    max-width: 1440px;
	min-width: 575px;
    margin: 0 auto;
    position: relative;
    background-repeat: repeat-y;
    background-image: url("images/AGB_BDY3.gif");
    background-size: 1440px 150px; /* crop left 1440px */
    background-position: left top;
	background-size: auto 150px; /* <-- THIS IS THE FIX */ 
	overflow: hidden; /* <-- hides the right 560px */
}

/* ================================
   2. BANNER
   ================================ */

#banner img {
    width: 1440px;      /* crop left 1440px */
    height: 150px;      /* fixed height */
    object-fit: cover;  /* ensures right side is cut */
    object-position: left top;
    display: block;
    margin: 0;
    padding: 0;
}

/* ================================
   3. MAIN LAYOUT: NAV + CONTENT
   ================================ */

#main-layout {
    display: flex;
}

/* ================================
   4. LEFT NAVIGATION BUTTON COLUMN
   ================================ */

#main-nav {
    width: 120px; /* location of the vertical brown line */
	flex-shrink: 0; /* prevents nav from collapsing */
    padding-top: 0px;
    position: relative;
	margin-left: 5px;
 }

/* Each button container */
.menu-button {
    width: 110px;
    height: 25px;
    margin-bottom: 10px;
    position: relative;
}

/* Normal and hover images stacked */
.menu-button img {
    width: 110px;
    height: 25px;
    position: absolute;
    top: 0;
    left: 0;
}

.btn-hover {
    display: none; /* hidden until hover */
}

/* Hover swap */
.menu-button:hover .btn-normal {
    display: none;
}
.menu-button:hover .btn-hover {
    display: block;
}

/* ================================
   5. FLYOUT MENUS
   ================================ */

.flyout {
    font-family: Arial, Helvetica, sans-serif; 
	font-size: 14px; 
	font-weight: normal;
	list-style: none;
	width: 150px;
    margin: 0;
    padding: 0;
    background: #8B0000; /* dkRed */
	color: yellow; 
	text-decoration: none;    
	border: 1px solid #400000;
    position: absolute;
    left: 110px; /* appears to the right of buttons */
    top: 0;
    display: none;
    z-index: 1000;
}

.menu-button.has-flyout:hover > .flyout.level-1 {
    display: block;
}

.flyout li {
	white-space: normal; 
	line-height: 1.2;
	padding: 6px 12px;
    cursor: pointer;
}

/* Hover behavior for flyout items */
.flyout li:hover {
    background: #AA0000; /* ltRed */
    color: #FFFF99;      /* ltYellow */
    font-weight: bold;
}

/* Submenu positioning */
.flyout .has-submenu {
    position: relative;
}

.flyout .has-submenu:hover > .flyout.level-2 {
    display: block;
}

/* Level 2 submenu */
.flyout.level-2 {
    left: 150px;
    top: 0;
}

/* Level 3 submenu */
.flyout.level-3 {
    left: 150px;
    top: 0;
}

/* Level 4 submenu */
.flyout.level-4 {
    left: 150px;
    top: 0;
}

.menu-button .flyout {
    font-size: 12px;
}


/* Base text color for all flyout levels */
.menu-button .flyout a {
	color: yellow;
    text-decoration: none;
}

/* Hover highlight */
.menu-button .flyout a:hover {
    background-color: #AA0000;
    color: #FFFF66;
    font-weight: bold;
}

/* Prevent visited-link purple/blue */
.menu-button .flyout a:visited {
    color: yellow;
}

/* Non-link items (submenu labels) */
.menu-button .flyout li {
    color: yellow;
}

/* For items using data-url instead of <a> */
.menu-button .flyout li[data-url] {
    color: yellow;
}


/* ================================
   6. RIGHT SIDE CONTENT AREA
   ================================ */

#content-area {
    flex: 1;
    padding-top: 20px;
    position: relative;
    box-sizing: border-box;

    max-width: 1200px;
    width: 100%;        /* allows shrinking */
    margin: 0 auto;     /* centers the content column */
}

/* ================================
   7. GOOGLE WIDGETS
   ================================ */
#widgets-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;   /* right-align the widgets */
    padding-top: 0px;        /* exactly what you asked for */
    padding-right: 10px;      /* 5px from the right edge */
    gap: 6px;                /* space between Translate and CSE */
}

#widgets-block {
    margin-bottom: 0px;
}
#widgets-block {
    width: max-content;
}
#widgets-block {
    align-items: flex-end;
}
#widgets-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;  /* keep children right-aligned */
    width: fit-content;     /* shrink to its contents */
    margin-left: auto;      /* push the whole block to the right edge */
}
#widgets-block {
    margin-top: -55px;
}



#cse-container {
    margin-bottom: 0px;
	width: 100%;
}

#translate-container {
    margin-bottom: 20px;
	padding-right: 90px;
}


#translate-container {
    width: 100px;
    height: 25px;
    margin-left: calc(1440px - 100px - 15px - 300px);
    /* Explanation:
       1440px total width
       - 100px widget width
       - 15px right margin
       - 300px left text boundary
    */
}
#cse-container {
    width: 100%;
    overflow: visible !important;
}

#cse-container {
    /* margin-top: 10px; */
}

#translate-container {
    margin: 0px; 
}


.goog-te-gadget {
    margin: 0 !important;
    padding: 0 !important;
}


.gsc-control-cse,
.gsc-control-cse .gsc-table-result,
.gsc-control-cse .gsc-input-box,
.gsc-control-cse .gsc-input {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.gsc-control-cse iframe {
    width: 100% !important;
    min-height: 40px !important;
    display: block !important;
}
/* Main CSE container */
.gsc-control-cse {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}
.gsc-input-box {
    border: 1px solid #999 !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    background: white !important;
    height: 28px !important;
    box-sizing: border-box !important;
}

input.gsc-input {
    font-size: 14px !important;
    padding: 2px 4px !important;
    height: 24px !important;
}
.gsc-search-button {
    height: 28px !important;
    padding: 0 10px !important;
    border-radius: 4px !important;
    background: #ddd !important;
    border: 1px solid #999 !important;
    font-size: 13px !important;
    color: #333 !important;
}

/* Remove the magnifying glass icon */
.gsc-search-button svg,
.gsc-search-button img {
    display: none !important;
}
.gsc-search-box {
    padding: 0 !important;
    margin: 0 !important;
}

.gsc-search-box table {
    margin: 0 !important;
}

.gsc-search-box td {
    padding: 0 !important;
}
/* Remove internal padding that pushes the search box left */
.gsc-search-box,
.gsc-search-box table,
.gsc-search-box td {
    padding: 0 !important;
    margin: 0 !important;
}
.gsc-input-box {
    height: 28px !important;
    line-height: 28px !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
}
.gsc-control-cse iframe {
    height: 40px !important;
    min-height: 40px !important;
    display: block !important;
}
.gsc-input-box {
    height: 40px !important;
    line-height: 40px !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
}

input.gsc-input {
    height: 26px !important;
    line-height: 26px !important;
    padding: 0 4px !important;
    font-size: 14px !important;
}

.gsc-search-button {
    height: 28px !important;
    line-height: 28px !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
}
.gsc-control-cse {
    font-size: 0 !important; /* forces compact mode */
}
.gsc-control-cse .gsc-input-box {
    height: 32px !important;
}
td.gsc-input {
    width: 180px !important;   /* adjust to your preferred width */
    max-width: 180px !important;
}
input.gsc-input {
    width: 100% !important;
    box-sizing: border-box !important;
}
.cse-label {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 4px;   /* space between label and input */
    text-align: right;    /* aligns with your right‑aligned widgets */
	position: relative;
    top: 18px;   /* adjust this value until it aligns perfectly */

}
	
#cse-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
}
#info-container {
    display: flex;
    align-items: center;
    gap: 6px;   /* space between text and icon */
	min-hieght: 20px;
}

.info-text {
    font-size: 14px;
    font-weight: bold;
}

.info-icon {
    width: 16px;
    height: 16px;
}

/* ================================
   8. TEXT AREAS
   ================================ */

#text-areas {
    margin-top: 0px;
}
#text-areas {
    margin-left: 50px;        /* aligns with brown line */
    margin-right: 50px;
    box-sizing: border-box;
	min-width: 0px;
}

.text-area {
    min-width: 0px;        /* follow parent width */
    max-width: 800px;   /* but never exceed 800 */
    padding: 20px;
    background: rgba(255,255,255,0.85);
    border-radius: 6px;
    margin-bottom: 30px;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

#text-area-1 {
    background: transparent;
	min-width: 0px;
	padding-bottom: 0px;
}
#text-area-1 {
    margin-top: -40px; 
}

#text-area-2 {
    background: transparent !important;
}
#text-area-2 {
    margin-top: 0px; /* or 10px, or 0px — whatever looks right */
	padding-top: 0px;
    margin-bottom: 0px; /* or 10px, or 0px — whatever looks right */
	padding-bottom: 0px;
}
#text-area-3 {
    background: transparent !important;
}
#text-area-3 {
    margin-top: 0px; /* or 10px, or 0px — whatever looks right */
	padding-top: 0px;
}

/* ================================
   9. Z-INDEX LAYERS
   ================================ */

#banner { z-index: 100; }
.menu-button { z-index: 800; }
.btn-hover { z-index: 900; }
.flyout { z-index: 1000; }
#widgets-block { z-index: 500; }
.text-area { z-index: 100; }
