/* Some overrides to the default bamboo style */


/** {*/
/*  outline: 1px solid plum;*/
/*}*/


/* use the width of the page */
body {
  max-width: 90vw;
}

textarea {
  font-family: monospace;
  font-size: 16px;
}


main {
	margin-bottom: 30px;
}

/* have images use the full width as well but not their full height */
img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* trying to get a route image */
.route-image img {
	width: 500px;
	height: 500px;
}

/* give blockquotes a background */
blockquote {
  background: #f4f2f2;
}

label {
	font-weight: bold;
}

nav {
	text-align: right;
}

/* Make 'nav' links in articles bigger - easier to see on a mobile screen */
.nav {
	font-size: 1.3em;
	font-weight: bold;
}

/* Image of the route */
.routemap img {
	height: 400px;
	width: 400px;
}


.post-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 2em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 1em;
}

.post-text {
  flex-grow: 1;
  max-width: 80%;
}

.overview-image {
  flex-shrink: 0;
}

.thumbnail {
  max-width: 100px;
  height: auto;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Modal overlay */
#imageModal {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

#imageModal img {
  width: 600px;
  height: 600px;
  border-radius: 6px;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
}

#imageModal.close-area {
  position: absolute;
  inset: 0;
  cursor: zoom-out;
}

.top-nav {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.5rem;
  margin-right: 1em;
}

.top-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}

.top-nav a {
  text-decoration: none;
  color: #333;
}


.post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  margin-bottom: 0.5em;
  flex-wrap: wrap;  /* allow wrapping */
}

.post-content {
  flex-grow: 1;
  min-width: 0;
  order: 1;  /* title first */
}

.post-actions {
  white-space: nowrap;
  display: flex;
  gap: 0.2em;
  order: 2;
  justify-content: flex-end;
}

.post-content h3 {
  font-size: 1.5em;
  margin: 0;
}

.post-actions button {
  margin-left: 0.3em;
  font-size: 0.83em;
  flex: 1 0 auto;
}

.post-actions .publish-toggle {
  min-width: 8em;  /* Adjust as needed for your longest label */
  text-align: center;
}

.controls {
  margin-top: 1em;
  margin-bottom: 1em;
}


.big {
	size: 20px;
}

#snackbar {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 2px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
}

#snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;} 
    to {bottom: 30px; opacity: 1;}
}


/* slightly less dark buttons */
button {
	background: #6d788f;
}

code {
	font-size: 1em;
	white-space: pre-wrap;
}

nav {
  margin-top: 1em;        /* Moves the whole nav down a bit */
  padding: 0.5em 0;       /* Optional: vertical padding inside nav */
}

nav a {
  margin-right: 1em;    /* Space between links */
  text-decoration: none;  /* Optional: cleaner look */
  display: inline-block;  /* So margin-right applies properly */
}

nav a:last-child {
  margin-right: 0;        /* Remove margin on last item */
}



#editor-container {
  display: flex;
  gap: 1em;
  align-items: stretch; /* make children fill height */
  min-height: 300px;    /* minimum height for the whole container */
}

#content,
#preview {
  flex: 1;
  height: auto;
  min-height: 300px;
}

#edit-form input,
#edit-form textarea,
#editor-container {
  margin-bottom: 1em;
}

/* add icon to extnerl links */
a[target="_blank"]::after {
    font-size: .7em;
    font-weight: bold;
    content: "\02197";
    margin: 0px 3px 0px 5px;
}

/* add icon to extnerl links */
a[target="_blank"]::after {
    font-size: .7em;
    font-weight: bold;
    content: "\02197";
    margin: 0px 3px 0px 5px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  width: 300px;
  text-align: center;
}

.modal-content input {
  width: 100%;
  padding: 0.5em;
  margin: 1em 0;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
}


/* smaller images on mobile */
@media only screen and (max-width: 570px) {
	
	#preview {
		display: none;
	}
	
	
	img {
		height: 100px;
	}
	
	.post-actions {
		aflex-direction: column;
		white-space: normal;
		margin-top: 0.5em;
	}
	.post-content h3 {
		font-size: 1.2em;
		margin: 0;
	}


	#imageModal img {
	  width: 400px;
	  height: 400px;
	  border-radius: 6px;
	  box-shadow: 0 0 30px rgba(0,0,0,0.6);
	}

}

@media (max-width:480px){
	body {
		abackground: pink;
	}
	
	.blog-summary {
		margin-bottom: -10px;
	}
	
	h1 {
		font-size:24px;
		margin-top: 0.75rem;
		margin-bottom: 0.5rem;
	}
	h2 {
		font-size:22px;
		margin-top: 0.75rem;
		margin-bottom: 0.5rem;
	}
	h3 {
		font-size:20px;
		margin-top: 0.75rem;
		margin-bottom: 0.5rem;
	}
	h4 {
	 	font-size:18px;
		margin-top: 0.75rem;
		margin-bottom: 0.5rem;
	}
	h5 {
		font-size:16px;
		margin-top: 0.75rem;
		margin-bottom: 0.5rem;
	}
}

/* Slightly bigger images on mobile when landscape */
@media screen and (max-device-width: 640px) and (orientation: landscape) {
	img {
		height: 200px;
	}
}