/* EWPH shortcode plugin formatting */

/* styles */

.ewph-heading
{
	color: white;
}

/* Filebase download replacement */

.ewph-download-error {
    color: #CC2222;
	font-style: bold;
	font-size: 120%;
}

.ewph-download-warning {
    color: #ff9933;
	font-style: bold;
	font-size: 120%;
}

.ewph-nav-green h4 {
    color:#73a842;
    font-weight: bold;
}

.ewph-nav-green p.ewph-cp-more {
    color: #dda6db;
    font-style: italic;
    text-align: right;
}

.ewph-nav-green:hover h4 {
    color: #415f25;
}

.ewph-nav-green:hover p.ewph-cp-more {
    color: #5f255e;
}

/* opening panels */

.ewph-panel {
	text-align: left;
	margin: 1rem 1.75rem;
	position: relative;
}

.ewph-panel .ewph-panel-heading a {
	color: inherit;
	text-decoration: none;
}

.ewph-panel .ewph-panel-heading a:visited {
	color: inherit;
}

.ewph-panel-heading {
	border-radius: 10px 0 0 10px;
	border-bottom: 2px solid;
}

.ewph-panel-heading.ewph-open {
	border-top: 2px solid;
	border-bottom: none;
}

.ewph-panel-body {
	display: none;
	padding: 0 2rem;
	border-radius: 0 0 0 10px;
	border-bottom: 2px solid;
}

.ewph-panel-heading {
	color: #000000;
}

.ewph-panel-title {
	padding: 0.5rem 1rem;
}

.ewph-panel-title i.fa {
	padding-right: 1rem;
}

.ewph-panel-title a:hover {
	text-decoration: none;
}

.ewph-panel-heading a:after {
	content: "\f078"; /* fa-chevron-down */
	font-family: 'FontAwesome';
	position: absolute;
	right: 1rem;
}

.ewph-panel-heading.ewph-open a:after {
	content: "\f077"; /* fa-chevron-up */
}

/* parent link */

.ewph-parent a {
  background-color: lightgray;
  border: none;
  border-radius: 5px;
  color: black;
  padding: 8px 28px;
  text-decoration: none;
  margin: 0 4px;
  cursor: pointer;
  font-weight: normal;
  font-size: 105%;
}

.ewph-parent a:hover {
  background-color: grey;
  color: rgb(237, 234, 234);
}

/* child pages */

.ewph-child-summary ul {
	padding: 0 0 .5em 0;
}

.ewph-child-summary ul li {
	list-style-type: none;
}

.ewph-child-summary-title {
	padding-bottom: .2em;
}

.ewph-child-summary-title i {
	font-family: FontAwesome;
	font-style: normal;
	font-weight: normal;
	padding: 0;
	display: inline-block;
	width: 1.5rem;
}

.ewph-child-summary-title
{
	padding-bottom: 0.6rem;
}

.ewph-child-summary-content,
.ewph-child-summary-more
{
	padding: 0 0 0.6rem 1.5rem;
}

.ewph-child-summary-title a {
	font-size: 120%;
	font-weight: bold;
	text-decoration: none;
	color: black;
	padding: 3px 0;
}

.ewph-child-summary .ewph-child-summary-title a:hover {
	background-color:#222222;
	color: white;
}

.ewph-child-summary-title a:visited {
	color: inherit;
}

.ewph-child-summary-more a {
  border: none;
	color: white;
	background-color: lightslategrey;
	text-decoration: none;
  border-radius: 3px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  text-align: left;
  padding: 5px 0.6rem;
  white-space: nowrap;
  overflow: hidden;
}

.ewph-child-summary-more a:hover,
.ewph-child-summary-more a:active, 
.ewph-child-summary-more a:visited {
    color: #ffffff;
    text-decoration: none;
}

.ewph-child-summary-item {
	padding-bottom: 1em;
}

.ewph-child-summary .ewph-child-none {
	font-weight: bold;
	font-size: 120%;
	color: firebrick;
}

.ewph-child-table .ewph-child-summary-content {
	margin-bottom: 0;
}

.ewph-child-table .ewph-child-summary-item {
	padding-right: 3em; 
	width: 50%;
}

.ewph-child-table-more {
	padding-left: 1.5em;
}

thead .ewph-posts-date {
	width: 12em;
}

tbody td.ewph-posts-date {
	text-align: center;
}

td.ewph-posts-row-year {
	font-weight: bold;
}

.ewph-posts-list tbody td {
	line-height: 1.0;
	padding: 3px;
}

.ewph-letter {
	padding: 15px;
	margin: 15px 25px 15px 25px;
	box-shadow: 5px 5px 7px #bbb;
	border: 1px solid black;
	border-radius: 3px;
}

.ewph-letter-paper {
	background-image: url("paper-bg.jpg");
	background-size: cover;
}

/* Image text overlay */

.ewph-image-text {
	position: relative;
}

.ewph-image-text-content {
  position: absolute;
  text-align: center;
}

body .site-container .ewph-image-text-content {
  h1, h2, h3, h4, h5 {
    color: inherit;
  }
}

/* Timelines */

.ewph-timeline-container {
	position: relative;
}

.ewph-timeline:before {
  top: 0;
  bottom: 0;
  position: absolute;
  content: " ";
  width: 3px;
  left: 50%;
  margin-left: -1.5px;
}

.ewph-timeline {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: space-between;
  box-sizing: border-box;
}

.ewph-timeline-item {
  position: relative;
  margin-bottom: 20px;
  width: 40%;
}

.ewph-timeline-item:nth-child(even) {
  margin-top: 68px;
}

.ewph-timeline-item > .ewph-timeline-badge {
  position: absolute;
  box-sizing: border-box;
  color: white;
  width: 30%;
  height: auto;
  padding: 5px;
  text-align: center;
  top: 20px;
  right: -40%;
  /* border: 2px solid rgb(96 139 168); */
  border-radius: 7px;
}

.ewph-timeline-item:nth-child(even) > .ewph-timeline-badge {
  left: -40%;
}

.ewph-timeline-item > .ewph-timeline-panel {
  border-radius: 7px;
}

.ewph-timeline-item > .ewph-timeline-panel:after {
  position: absolute;
  box-sizing: border-box;
  top: 30px;
  right: -10%;
  width: 10%;
  display: inline-block;
  content: " ";
}

.ewph-timeline-item:nth-child(even) > .ewph-timeline-panel:after {
  left: -10%;
}

.ewph-timeline-heading {
  margin-top: 5px;
  margin-left: 5px;
  font-weight: 600;
}

.ewph-timeline-heading i.fas {
  float: right;
  padding-right: .5em;
}

.ewph-timeline-body {
  padding: 15px;
  margin-bottom: 0;
}

.ewph-timeline-item p:has(.fas),
.ewph-showcase-item p:has(.fas),
.ewph-showcase-item p:last-child{
  margin-bottom: 0;
}

.ewph-timeline-footer {
  padding: 0.5em;
  border-radius: 0 0 7px 7px;
  text-align: right;
}

.ewph-timeline-footer a {
  cursor: pointer;
  text-decoration: none;
  color: rgb(64,64,64);
}

.ewph-timeline-footer a:hover {
  color: rgb(32, 32, 32);
  font-weight: 700;
}

.ewph-timeline-footer a:visited {
  font-weight: 700;
  color: rgb(16, 16, 16);
}

/*** showcase panels ***/

/* jQuery dialog always z-index: 101 */

.mce-container,
.mce-container-body .wp-editor-expand div.mce-toolbar-grp {
  z-index: 99;
}

.ewph-showcase {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 1rem;
  padding: 0 1rem;
}

.ewph-showcase p:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
}

.ewph-hpt-childpage .ewph-showcase {
  padding: 0;
}

.ewph-showcase-item {
  /* aspect-ratio: 4 / 5; */
  flex-basis: 22em;
  flex-grow: 0;
  aspect-ratio: 3 / 4;
  padding: 0.75rem;
  container-type: inline-size;
  overflow: hidden;
  overflow-y: auto;
  border: solid 2px #DDD;
  border-radius: 7px;
}

/* .ewph-showcase-item {
  aspect-ratio: 3 / 4;
} */

.ewph-showcase-item.square {
    aspect-ratio: 1;
}

.ewph-showcase-item.tall {
    aspect-ratio: 3/4;
}

.ewph-showcase-item.portrait {
    aspect-ratio: 1/2;
}

.ewph-landscape-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 1.25rem;
    container-type: inline-size;
    overflow: hidden;
    overflow-y: auto;
    border: solid 2px #DDD;
    border-radius: 7px;
    margin-bottom: 2cqh;
}

.ewph-showcase .ewph-showcase-item img {
	float: none;
	margin: 0;
    width: 100%;
    max-height: 100%;
	aspect-ratio: 16/9;
    object-fit: cover;
	height: min-content;
}

.ewph-showcase .ewph-showcase-item.portrait img {
    aspect-ratio: 2/3;
}

.ewph-showcase .ewph-showcase-item img.keep
{
  aspect-ratio: unset;
  object-fit: scale-down;
  object-position: 50% 50%;
}

body .ewph-showcase-item p {
  font-size: 0.9rem;
}

body .ewph-showcase-item h1,
body .ewph-showcase-item h2,
body .ewph-showcase-item h3,
body .ewph-showcase-item h4,
body .ewph-showcase-item h5,
body .ewph-showcase-item h6 {
  line-height: 1;
  padding: 0.6rem 0;
  margin: 0;
}

body .ewph-showcase-item h1 {
  font-size: 1.3rem;
}

body .ewph-showcase-item h2 {
  font-size: 1.2rem;
}

body .ewph-showcase-item h3 {
  font-size: 1.1rem;
}

body .ewph-showcase-item h4 {
  font-size: 1rem;
}

.ewph-showcase-item:hover:has(a),
.ewph-landscape-row:hover:has(a) {
  background-color: var(--bck-grey);
  transition-property: background-color;
  transition-timing-function: ease-in;
  transition-duration: 0.5s;
}

.ewph-showcase-item:hover:has(a) {
  background-color: #ddd;
  transition-property: background-color;
  transition-timing-function: ease-in;
  transition-duration: 0.5s;
}

.ewph-showcase-item a {
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: #444;
}

.ewph-showcase-item a:hover {
  color: #000;
}

.entry-content .ewph-showcase-content .df-element {
  margin: 0 !important;
}

/* showcase landscape */

body.page-template-template_property {
  .entry-content:has(.ewph-landscape-row) {
    max-width: 85%;
    margin-left:auto;
    margin-right: auto;
  }

  .ewph-showcase-item,
  .ewph-landscape-row {
    background-color: white;
  }
}

body:not(.page-template-template_property) {
  .ewph-showcase-landscape {
    margin: 0 10%;
  }
}

.ewph-showcase-landscape a {
  display: block;
  cursor: pointer;
  text-decoration: underline;
  color: indigo;
}

.ewph-showcase-landscape a:hover {
  color: purple;
}

.ewph-showcase-item:has(a) img:hover,
.ewph-showcase-landscape:has(a) .ewph-landscape-row:hover img {
  transform: scale(1.01);
  animation: 10s zoomin;
}

/* datatable */

a.ewph-datatable-row {
  display: block;
  text-decoration: none;
  color: #444;
}

@keyframes zoomin {
  0% {
    background-size: 100% 100%;
  }
  100% {
    background-size: 110% 110%;
  }
}

/* Photo database viewer */

.ewph-photo-db-viewer table.dataTable tbody {
  tr img,
  .ewph-photo-view-description {
    max-height: 20rem;
    width: auto;
    overflow: auto;
  }

  .ewph-photo-view-image {
    text-align: center;
  }

  .ewph-photo-ref {
    font-style: italic;
    font-size: 90%;
    padding-top: 1em;
  }
  
  .ewph-photo-view-date,
  .ewph-photo-view-edit {
    padding-top: 0.5em;
  }

  .ewph-photo-view-edit a {
    text-decoration: none;
    color: darkblue;
    padding-top: 0.5em;
    font-size: 90%;
  }

  .ewph-photo-view-image {
    cursor: pointer;
  }
}


/* Photo modal image window */

.ewph-photo-modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 100; /* Sit on top */
  /* padding-top: 100px; Location of the box */
  left: 0;
  top: 100px;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.ewph-photo-modal-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
  /* max-width: 700px; */
}

#ewph-photo-modal-caption {
  margin: auto;
  display: block;
  max-width: 80%;
  /* max-width: 700px; */
  text-align: center;
  color: #ccc;
  padding: 0.6rem 0;
  /* height: 150px; */
}

#ewph-photo-modal-image, 
#ewph-photo-modal-caption {  
  animation-name: photo-modal-zoom;
  animation-duration: 0.6s;
}

@keyframes photo-modal-zoom {
  from {transform:scale(0)} 
  to {transform:scale(1)}
}

#ewph-photo-modal-close {
  float: right;
  padding-right: 1rem;
  color: #f1f1f1;
  font-size: 3rem;
  font-weight: bold;
  transition: 0.3s;
}

#ewph-photo-modal-close:hover,
#ewph-photo-modal-close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* census demographics */

img.ewph-census-graph  {
  width: 80%;
  margin-left: 10%;
  border: solid 2px #DDD;
  border-radius: 7px;
  padding: 20px;
}

.ewph-census-table {
  columns: 10;          /* 10 columns on large screens */
  column-gap: 1rem;
  text-align: center;
  border: solid 2px #DDD;
  border-radius: 7px;
  padding: 12px 12px 0 12px;
}

.ewph-census-table div {
  background-color: #dFe8eC;
  padding: 0.1rem;
}

.ewph-census-table div:nth-child(6n - 5) {
  background-color: #bFc8cC;
  font-weight: 800;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  padding: 0.2rem;
}

.ewph-census-table div:nth-child(6n) {
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
  margin-bottom: 12px;
}

.ewph-census-table > * {
  break-inside: avoid;  /* keep items from splitting across columns */
}

/* 5 columns */
@media (max-width: 1440px) {
  .ewph-census-table {
    columns: 5;
  }
}

/* 2 columns */
@media (max-width: 767px) {
  .ewph-census-table {
    columns: 2;
  }
}

/* 1 column */
@media (max-width: 480px) {
  .ewph-census-table {
    columns: 1;
  }
}

/* property database */

.site-container:has(.site-inner .property-db-list) .site-header #menu-search {
  display: none;
}

.ewph-property-details h1,
.ewph-property-details p,
.ewph-property-details p.ewph-property-add-inf {
  text-align: center;
}

.ewph-property-occupants td a,
.ewph-property-occupants td a:link,
.ewph-property-occupants td a:visited {
  text-decoration: none;
  cursor: pointer;
  color: inherit;
}

/* Showcase Facts */

.entry-content .ewph-showcase-facts > ul {
  height: 400px;
  width: 100%;
  overflow: scroll;
  display: flex;
  gap: 2vw; /*changed*/
  padding-left: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.6rem;
  scrollbar-color: purple #CFD8DC; 
}

.entry-content .ewph-showcase-facts .ewph-showcase-item-fact {
  list-style-type: none;
  border: solid 2px #DDD;
  border-radius: 1rem;
  flex: 0 0 35%;
  padding-top: 20px;
  scroll-snap-align: start;
  text-align: left;
  counter-increment: markers;
  background-color: white;
  overflow:auto; /*added*/
  padding: 20px;
  padding-bottom: 0.6rem;
}

@supports (scroll-marker-group: before) {
  /* scroll-marker-group supported */
  .ewph-showcase-facts > ul{
    scroll-marker-group: after;
  }

  .ewph-showcase-facts .ewph-showcase-item-fact::scroll-marker {
    content: counter(markers);
    font-family: sans-serif;
    width: fit-content;
    height: 1em;
    padding: 5px;
    color: black;
    text-decoration: none;
    border: 2px solid rgb(0 0 0 / 0.15);
    border-radius: 0.5rem;
    background-color: #CFD8DC;
  }

  /*
  .ewph-showcase-facts .ewph-showcase-item-fact:last-child::scroll-marker {
    content: "Last";
  } 
  .ewph-showcase-facts .ewph-showcase-item-fact:first-child::scroll-marker {
    content: "First";
  }
*/
  .ewph-showcase-facts ::scroll-marker:hover {
    background-color: #f7f2f2;
  }

  .ewph-showcase-facts ::scroll-marker:target-current {
    background-color: purple;
    color: white;
  }

  .ewph-showcase-facts ::scroll-marker-group {
    display: flex;
    gap: 0.4em;
    place-content: center;
    margin-bottom:80px; /*added*/
  }
}

@supports not (scroll-marker-group: before) {
  /* scroll-marker-group not supported */
}

/* buttons */

.ewph-button {
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1.75rem;
  text-align: center;
  text-decoration: none;
  font-size: 105%;
  font-weight: normal;
  margin: 0 0.25rem;
  cursor: pointer;
}

.ewph-button a, 
.ewph-button a:link, 
.ewph-button a:visited {
  text-decoration: none;
  color: inherit;
}

body .site-container p:has(.ewph-button) {
  padding: 0.6rem 0;
}


/* Popup windows */

.entry-content:has(.ewph-popup) a[href^="#"] {
  text-decoration: none;
  font-weight:bold;
  border-radius: 2px;
  color: rgb(54, 120, 54);
}

.ewph-popup {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  z-index: 100;
}

.ewph-popup:target {
  display: table;
  top: 100px;
}

.ewph-popup-dialog {
  display: table-cell;
  vertical-align: top;
}

.ewph-popup-content {
  margin: 0 auto;
  background-color: #f3f3f3;
  position: relative;
  width: 25%;
  min-width: 20rem;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-radius: 7px;

  /* Add animation */
  -webkit-animation-name: ewph-popup-entry;
  /* Chrome, Safari, Opera */
  -webkit-animation-duration: 1s;
  /* Chrome, Safari, Opera */
  animation-name: ewph-popup-entry;
  animation-duration: 1s;

  z-index: 100;
}

@keyframes ewph-popup-entry {
  from {
    top: -100px;
    opacity: 0;
  }
  to {
    top: 0px;
    opacity: 1;
  }
}

.ewph-popup-closebtn {
  text-decoration: none;
  float: right;
  font-size: 200%;
  font-weight: bold;
  color: #0f0e0e;
}

.ewph-popup-closebtn:hover,
.ewph-popup-closebtn:focus {
  color: #000;
  cursor: pointer;
}

.ewph-popup-container {
  padding: .2rem 1rem;
  z-index: 100;
}

/* Media */

@media (max-width: 767px) 
{
  .ewph-timeline:before {
    left: 60px;
	  display: none;
  }

  .ewph-timeline-item {
	  position: static;
    width: 100%;
    margin-top: 0.6rem;
    padding-left: 0;
  }

  .ewph-timeline-item > .ewph-timeline-panel:after {
    position: static;
    display: none;
  }

  .ewph-timeline-item:nth-child(even) {
    margin-top: 0.6rem;
  }

  .ewph-timeline-item > .ewph-timeline-badge {
    width: 50%;
    position: static;
	  border-radius: 7px 7px 0 0;
  }

  .ewph-timeline-item:nth-child(even) > .ewph-timeline-badge {
    left: -7.5px;
  }

  .ewph-timeline-item > .ewph-timeline-panel:after {
    margin-left: 0;
    left: 104px;
    width: 16px;
  }

  .ewph-timeline-item:nth-child(even) > .ewph-timeline-panel:after {
    left: 104px;
  }
}

@media only screen and (max-width: 767px) 
{
	.ewph-showcase,
  .ewph-landscape-row {
		padding: 0;
		grid-template-columns: 1fr;
	}

  .ewph-landscape-row .ewph-landscape-item:first-child {
    border-bottom: solid 2px #DDD;
  }
}

@media only screen and (max-width: 767px) 
{
	.ewph-showcase-facts .ewph-showcase-item-fact {
    flex: 0 0 99%;
  }

  .ewph-photo-modal-content {
    width: 100%;
  }

}
