*
{
	box-sizing: border-box;
}

body
{
	font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    background: antiquewhite;
	margin: 0;
}

iframe
{
    width: 100%;
    border: none;
}

.colored-box
{
    background: linear-gradient(to bottom, antiquewhite, burlywood);
    box-shadow: 4px 4px 4px lightgray;
}

.colored-title-box
{
    background:  darkgoldenrod;
}

/* general styling for content boxes */

.content-box
{
	border-radius: 6px 6px 6px 6px;
}

.content-box-title
{
    color: white;
    padding: 5px;
    font-size: 120%;
    text-align: center;
    text-shadow: 1px 1px 0 black;
	border-radius: 6px 6px 0 0;
}

.content-box-title a
{
	text-decoration: none;
	color: inherit;
	padding: 5px;
}

.content-box-title a:hover
{
	background-color: gold;
}

.content-box-content
{
    padding: 8px;
}

/* Styles for the "J.A. Tarbell" header at the top of the page
*/

#library-header
{
    margin-top: 20px;
    margin-bottom: 10px;
	margin-left: auto;
	margin-right: auto;
    width: 98%;
    display: flex;
    flex-direction: row;
	column-gap: 8px;
    text-align: center;
    align-items: center;
}

#library-header img
{
    width: 30%;
	max-width: 330px;
}

#library-header > div
{
    flex-grow: 1;
}

#library-header > div > div
{
    margin-top: 4px;
    font-weight: normal;
}

#library-header > div > div:first-child
{
    font-size: 200%;
    font-weight: bold;
    text-shadow: 1px 1px 0 white;
}

/* Narrow screen: hide first image */
@media only screen and (max-width: 900px)
{
	#library-header img:first-of-type
	{
		display: none;
	}
}

@media only screen and (max-width: 700px)
{
	#library-header > div > div:first-child
	{
		font-size: 150%;
	}
}

.urgent-announcement
{
    padding-top: 10px;
    text-align: center;
    font-size: 140%;
    font-weight: bold;
    color: crimson;
}

.announcement
{
    padding-top: 10px;
    text-align: center;
    font-size: 120%;
    font-weight: bold;
    color: #916a08;
}

/* TOP MENU */

#top-menu
{
	position: fixed;
	top: 0;
	width: 100%;
	display: none;
	flex-direction: row;
	flex-wrap: wrap;
	row-gap: 2px;
	column-gap: 6px;
	justify-content: center;
	background: burlywood;
	padding: 1px;
}

#top-menu button
{
	flex: 0 1 110px;
    background:  darkgoldenrod;
    color: white;
    padding: 3px;
    font-size: 90%;
    text-align: center;
    text-shadow: 1px 1px 0 black;
	border: none;
	border-radius: 3px;
	margin: 1px;
	cursor: pointer;
}

/* MENU BAR */

#button-bar
{
	width: 94%;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	row-gap: 10px;
	column-gap: 10px;
	justify-content: center;
	margin-top: 20px;
	margin-left: auto;
	margin-right: auto;
}

#button-bar button
{
	font-family: "Times New Roman", Times, serif;
	font-weight: bold;
	font-size: 90%;
	color: white;
	
	flex: 0 1 120px;
	justify-content: center;
    background: linear-gradient(to bottom, antiquewhite 0%,burlywood 5%,darkgoldenrod 100%);
	box-shadow: 3px 3px 7px 1px rgba(0,0,0,0.69);
	border-radius: 6px;
	cursor: pointer;
	height: 40px;
	border: none;
}

#button-bar button.image-button
{
	padding: 0;
}

#button-bar button img
{
	width: 120px;
	height: 40px;
}

/* MAIN CONTENT (stuff below the header) */

#main-content
{
	margin-top: 25px;
	margin-left: auto;
	margin-right: auto;
    width: 99%;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	row-gap: 10px;
	column-gap: 10px;
}

/* LEFT COLUMN */

#left-column
{
	flex: 1 1 0%;
    overflow-x: hidden;     /* for strange IE behaviour */
	height: max-content;
	display: flex;
	flex-direction: column;
	row-gap: 10px;
	column-gap: 10px;
}

#left-column .content-box, #left-column .tab-content
{
	flex: 1 0 auto;

	flex-direction: column;
}

#left-column .content-box-title
{
	flex: 0 0 auto;
}

#left-column .content-box-content
{
	flex: 1 0 auto;
}

/* Style the tab */
div.tab-buttons
{
	display: flex;
	flex-wrap: wrap-reverse;
	align-items: flex-end;
	justify-content: flex-start;

    overflow: hidden;
}

/* Style the buttons inside the tab */
div.tab-buttons button
{
	display: flex;
	align-items: center;
	justify-content: center;
    margin-left: 3px;
    background-color: burlywood;
    color: white;
    font-size: 110%;
    text-shadow: 1px 1px 0 black;
	border-radius: 10px 10px 0 0;
    float: left;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    width: 150px;
	height: 36px;
}
	
div.tab-buttons button img
{
	width: 26px;
	height: 26px;
	margin-right: 8px;
}

/* Change background color of buttons on hover */
div.tab-buttons button:hover
{
    background-color: burlywood;
    color: black;
    text-shadow: none;
}

/* Create an active/current tablink class */
div.tab-buttons button.active
{
    background-color: darkgoldenrod;
}

/* Style the tab content */
div.tab-content
{
    display: none;
    border-top: none;
}

div.tab-content iframe
{
}

#events-box, #events-tab
{
}

#monday-box iframe, #mondays-tab iframe
{
    padding-bottom: 8px;
}

#links-tab
{    
}

#well-water
{
    display: flex;
    flex-direction: row;
    align-items: center;
}

#well-water img
{
    height: 140px;
}

#well-text ul
{
    margin: 0 4px 5px 50px;
    list-style-type: none;
    padding-left: 0;
}

#well-text ul > li
{
    margin-top: 4px;
    margin-bottom: 2px;
}

#well-text .title
{
    font-weight: bold;
}

#well-text .subtitle
{
    font-style: italic;
}

/* ==== styling for the SEARCH Box ==== */

div.search-catalog ul
{
    font-size: 16px;
}

div.search-catalog ul > li
{
    padding-top: 4px;
    padding-bottom: 4px;
    line-height: 1.2;
}

div.search-catalog ul > li p
{
    margin-top: 6px;
    margin-bottom: 0px;
}

/* ==== styling for the DOWNLOADABLE BOOKS Box ==== */

div.link-and-image img
{
	float: left;
	width: 33%;
	max-width: 200px;
	padding-right: 5px;
	padding-bottom: 5px;
}

.content-column
{
	
}

/* RIGHT COLUMN */

#right-column
{
	flex-basis: 310px;
	
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	row-gap: 8px;
	column-gap: 10px;
	align-content: flex-start;
}

#right-column .content-box
{
	display : inherit;
	flex: 1 0 auto;
	width: 100%;
}

#right-column .content-box-title
{
	writing-mode: vertical-lr;
	padding-bottom: 10px;
	text-align: right;
	border-radius: 0 6px 6px 0;
	transform: rotate(180deg);
}

/* ==== styling for the LIBRARIAN Box ==== */

#librarians-panel dl
{
    font-size: 16px;
    margin: 4px 4px 0 4px;
}

#librarians-panel dd
{
    font-size: 15px;
    margin: 4px 4px 8px 30px;
}

/* ==== styling for the CALENDAR box ==== */

#calendar-panel
{
	width: fit-content;
}

#calendar-panel .content-box-content
{
    align-items: center;
}

#full-calendar-button
{
    margin-bottom: 5px;
    font-size: 16px;
    color: white;
    text-shadow: 1px 1px 0 black;
    background: darkgoldenrod;
	border-radius: 5px;
    padding: 4px 12px;
    cursor: pointer;
}

/* ==== styling for the Library HOURS box ==== */

#hours-panel
{
	overflow-x: hidden;
}

#hours-panel dl
{
    font-size: 15px;
    margin: 4px 4px 0 4px;
}

#hours-panel dt
{
    float: left;
    clear: left;
    width: 92px;
    text-align: left;
    font-weight: bold;
}
  
#hours-panel dd
{
    margin: 0 0 0 100px;
    padding: 0 0 4px 0;
}

/* ==== styling for the LINKS box ==== */

#quick-links-panel
{
	width: fit-content;
}

#quick-links-panel ul
{
    font-size: 16px;
    margin: 0 4px 5px 4px;
    list-style-type: none;
    padding-left: 0;
}

#quick-links-panel ul > li
{
    margin-top: 8px;
    margin-bottom: 8px;
}

#quick-links-panel li.link-and-image
{
    display: flex;
    align-items:center;
    flex-direction: row;
    height: 90px;
}

#quick-links-panel li.image-right div:first-child
{
    flex-grow: 1;
    margin-right: 20px;
}

#quick-links-panel li.image-left div:last-child
{
    flex-grow: 1;
    margin-left: 30px;
}

#quick-links-panel img
{
    max-height: 90px;
}

#quick-links-panel a[href="old_index.html"]
{
    font-style: italic;
}

.user-content
{
	font-size: 16px;
}

.oops-div
{
	margin: 20px auto;
	display: flex;
	flex-direction: row;
	justify-content: center;
	column-gap: 20px;
}

.oops-div img
{
	width: 120px;
}

.oops-box
{
	display: flex;
	flex-direction: column;
	column-gap: 4px;
	justify-content: center;
    font-size: 18px;
}

.oops-div span:first-child
{
    width: 66px;
    display: inline-block;
}

.oops-reason, .oops-source
{
	font-family: "Courier", monospace;
	font-size: 16px;
	margin-left: 12px;
}

/* =====  Dynamic column sizing ======= */

@media only screen and (max-width: 1000px)
{
	#main-content
	{
		flex-direction: column;
	}

	#right-column
	{
		flex-basis: auto;
	}
	
	#top-menu
	{
		display: flex;
	}
	
	#library-header
	{
		margin-top: 36px;
	}
}

@media only screen and (max-width: 810px), (min-width: 1000px) and (max-width: 1120px)
{
	div.tab-buttons button
	{
		font-size: 90%;
		width: 110px;
		height: 30px;
	}
	
	div.tab-buttons button img
	{
		width: 20px;
		height: 20px;
		margin-right: 7px;
	}
	
	.content-box-title
	{
		font-size: 110%;
		padding: 4px;
	}
}

@media only screen and (max-width: 610px)
{
	div.tab-buttons button
	{
		font-size: 70%;
		width: 84px;
		height: 24px;
	}
	
	div.tab-buttons button img
	{
		width: 14px;
		height: 14px;
		margin-right: 6px;
	}
	
	.content-box-title
	{
		font-size: 80%;
		padding: 3px;
	}
	
	#button-bar
	{
		display: none;
	}

	#library-header
	{
		margin-top: 54px;
	}
}
