/*------------------ 
Frontend related CSS
------------------*/

/* Base styles for mobile devices */
.layout-container {
  display: flex;
  flex-direction: column; /* Stack vertically by default */
  gap: 16px; /* Space between sidebar and main area */
  padding: 16px;
	 font-family: var(--e-global-typography-primary-font-family), Sans-serif;
}

.sidebar {
  background-color: #f4f4f4;
  padding: 20px;
  border: 1px solid #ddd;
}

.main-area {
  /*background-color: #e0e0e0;*/
 /* padding: 20px;*/
 /* border: 1px solid #ddd;*/
	position: relative;
}

/* Desktop screens */
@media (min-width: 768px) {
  .layout-container {
    flex-direction: row; /* Sidebar and main area side by side */
  }

  .sidebar {
    flex: 0 0 25%; /* Sidebar takes 25% width, doesn't grow or shrink */
  }

  .main-area {
    flex: 1; /* Main area takes remaining space (75%) */
  }
}

.santis-mt-wrap  {
/*    background-color: #f9f9f9;*/
    padding: 20px;
/*    border: 1px solid #e5e5e5;*/
    /*margin-bottom: 20px;*/
}

.santis-mt-wrap div.tab-pane {
    padding: 20px;
}

.santis-mt-wrap #santis-mt-lookup {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    gap: 10px;
   
}



.santis-mt-wrap #santis-mt-lookup .location-wrap {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
}

.santis-mt-wrap #santis-mt-lookup .location-wrap span {
    margin: auto;
}

@media (min-width: 768px) {
.santis-mt-wrap #santis-mt-lookup .location-wrap {
    flex-direction: row;
}
}

.santis-mt-wrap #santis-mt-lookup .col-6 {
    width: 100%;
}

@media (min-width: 768px) {
.santis-mt-wrap #santis-mt-lookup .col-6 {
    width: 40%;
}	
}


.santis-mt-wrap .representatives-wrap {
    display: flex;
    flex-direction: column;
}
.santis-mt-wrap .loading-modal {
    display: none;
}
.santis-mt-wrap.loading .loading-modal {
     position: absolute;
    left: 0px;
    top: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #0000002e;
    color: #fff;
    z-index: 100;
}

/* Container for the loading spinner */
.loading-spinner {
  display: inline-block;
  width: 40px; /* Adjust size as needed */
  height: 40px; /* Adjust size as needed */
  border: 4px solid #f3f3f3; /* Light gray border */
  border-top: 4px solid #3498db; /* Blue border for the spinner */
  border-radius: 50%; /* Makes it circular */
  -webkit-animation: spin 1s linear infinite;
          animation: spin 1s linear infinite; /* Rotate animation */
}

/* Keyframes for the spinning animation */
@-webkit-keyframes spin {
  0% {
    transform: rotate(0deg); /* Start at 0 degrees */
  }
  100% {
    transform: rotate(360deg); /* End at 360 degrees (full rotation) */
  }
}
@keyframes spin {
  0% {
    transform: rotate(0deg); /* Start at 0 degrees */
  }
  100% {
    transform: rotate(360deg); /* End at 360 degrees (full rotation) */
  }
}

.santis-mt-wrap .options-wraps {
    position: relative;
    overflow: hidden;
	height: 100%;
    display: flex;
    flex-direction: column;
}

/* Make .tab-content fill the remaining space */
.santis-mt-wrap .options-wraps .tab-content {
    flex-grow: 1;  /* Allows it to expand and fill the remaining space */
    overflow-y: auto; /* Enables scrolling if content overflows */
    display: flex;
    flex-direction: column;
	    background: #fff;
    border-radius: 0 10px 10px;
}

.santis-mt-wrap input[readonly], .santis-mt-wrap textarea[readonly] {
    background-color: #f5f5f5; /* Light gray background */
    color: #666; /* Darker text */
    border: 1px solid #ccc; /* Subtle border */
    cursor: not-allowed; /* Shows a "not-allowed" cursor */
}

.email-form .email-body-preview {
	background-color: #f5f5f5; /* Light gray background */
    color: #666; /* Darker text */
    border: 1px solid #ccc; /* Subtle border */
    cursor: not-allowed; /* Shows a "not-allowed" cursor */
	padding: 5px 17px;
    height: 300px;
    overflow: auto;
}

/* .email-form .email-body-preview that has content editable attr */
.email-form .email-body-preview[contenteditable] {
    background-color: #fff; /* Light gray background */
    color: #333; /* Darker text */
    border: 1px solid #ccc; /* Subtle border */
    cursor: text; /* Shows a "text" cursor */
}


.santis-mt-wrap .email-form {border:1px solid #ffffff; padding: 5px; margin-bottom: 20px;}

.santis-mt-wrap .representatives-wrap .inner, .santis-mt-wrap .riding-wrap .inner, .santis-mt-wrap .letter-generation .inner  {
    gap: 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
	margin-bottom: 20px;
}

.santis-mt-wrap .representatives-wrap .inner, .santis-mt-wrap .letter-generation .inner  {margin-bottom: 0px;}

.representatives-wrap .inner .rep, .riding-wrap .inner .riding {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 10px;
    gap: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.representatives-wrap .rep.selected, .letter-style.selected {
    border: 2px solid #000;
}
.representatives-wrap .inner .rep .rep-image {
    width: 140px;
    height: 140px;
    background-position: center;
    background-size: cover;
    aspect-ratio: 1/1;
}
.representatives-wrap .inner .rep .info, .riding-wrap .inner .riding .info {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
}
.representatives-wrap .inner .rep .info h3, .representatives-wrap .inner .rep .info p, .riding-wrap .inner .riding .info h3, .riding-wrap .inner .riding .info p {
    width: 100%;
    font-size: 16px;
    margin: 0;
}

.riding-wrap .inner p, .representatives-wrap .inner p, p.error-message {margin-bottom: 0px;}

.representatives-wrap .inner .rep button.select-rep {
    width: 100%;
    padding: 10px;
}
.letter-select, #letter-edit {
    display: flex;
    gap: 10px;
    flex-direction: column;
/*
    position: absolute;
*/
    top: 0;
/*
    left: 110%;
*/
    width: 100%;
    height: 100%;
    background: #fff;
/*
    opacity: 0;
*/
    overflow-x: scroll;
    min-height: 200px;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.3s;
}
.letter-select {
    z-index: 9;
}
#letter-edit {
    z-index: 10;
}
.letter-select h4 {
    margin: 0;
}
.letter-select.visible, #letter-edit.visible {
    left: 0;
    opacity: 1;
}
.santis-mt-wrap .letter-style {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    gap: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
#letter-edit h4 {
    margin: 0;
    padding: 10px;
    font-weight: bold;
}
#letter-edit #santis-mt-email-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 10px;
    gap: 10px;
}
#letter-edit #santis-mt-email-form input[type="text"], #letter-edit #santis-mt-email-form textarea {
    padding: 10px 4px;
}

#santis_mt_main_area .nav-tabs {display: none;}

#santis_mt_main_area .nav-tabs .nav-link {
    border-color: #fff;
    color: #333;
    pointer-events: none; /* Disables clicking */
    cursor: default; /* Prevents click cursor */
    opacity: 1; /* can makes tabs look disabled (optional) */
}

#santis_mt_main_area .nav-tabs .nav-link:hover {
    background-color: #96cae7;
}

/*lower in tab buttons*/
#santis_mt_main_area .tab-nav-btns {
    display: flex;
    flex-direction: row;
    gap: 10px; /* Adds spacing between buttons */
    width: 100%; /* Ensures the container spans full width */
}

#santis_mt_main_area .tab-nav-btns button {
    flex: 1; /* Makes both buttons take equal width */
}

#santis_mt_main_area .tab-nav-btns button:hover {
}

#santis_mt_main_area .letter-generation .email-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Spacing between fields */
        margin: auto auto 20px;
	    border: 1px solid #ddd;
    padding: 10px;
}

/* Create a two-column layout for inputs */
#santis_mt_main_area .letter-generation .email-form .form-group {
    display: flex;
    flex-direction: column;
    width: 100%; /* Each input takes half of the row */
}

@media (min-width: 768px) {
	#santis_mt_main_area .letter-generation .email-form .form-group {
    width: calc(50% - 10px); /* Each input takes half of the row */
}
}

/* Ensure full width for the message field */
#santis_mt_main_area .letter-generation .email-form .full-width {
    width: 100%;
}

/* Style inputs for better readability */
#santis_mt_main_area .letter-generation .email-form label {
    font-weight: bold;
    margin-bottom: 5px;
}

#santis_mt_main_area .letter-generation .email-form input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Style the message preview */
#santis_mt_main_area .letter-generation .email-body-preview {
    min-height: 200px;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
    background: #f9f9f9;
    font-family: Arial, sans-serif;
    line-height: 1.5;
}

#santis_mt_main_area .letter-generation .email-body-preview[contenteditable], .email-form .email-body-preview[contenteditable] {
    background-color: #fff; /* Light gray background */
    color: #333; /* Darker text */
    border: 1px solid #ccc; /* Subtle border */
    cursor: text; /* Shows a "text" cursor */
}

#santis_mt_main_area .letter-generation .accordion-item {
    margin-bottom: 10px;
}

#santis_mt_main_area .accordion-body {
    padding: 0;
}
@media (min-width: 768px) {
#santis_mt_main_area .accordion-body {
    padding: 2%;
}
}

#santis_mt_main_area .debug-message {
    position: absolute;
    top: 0;
    right: 0;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.8); /* Dark background for visibility */
    color: white;
    font-size: 14px;
    border-radius: 3px;
    z-index: 9999; /* Ensure it's above other elements */
}

#santis_mt_main_area .debug-message.enabled {
    background-color: rgba(0, 128, 0, 0.8); /* Green for enabled */
}

#santis_mt_main_area .debug-message.disabled {
    background-color: rgba(255, 0, 0, 0.8); /* Red for disabled */
}

#santis_mt_main_area .send-copy-wrapper {    
	display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
	margin-bottom: 10px;
}
#santis_mt_main_area .send-copy-wrapper label[for="sendCopy"] {
        margin-top: -3px;
}

#santis_mt_main_area .send-confirmation-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: space-between;
	    margin-bottom: 15px;
}
@media (min-width: 768px) {
#santis_mt_main_area .send-confirmation-info {
    flex-direction: row;
}
}
#santis_mt_main_area .send-confirmation-info > * {
    flex: 1;
	background: #f4f4f4;
    padding: 8px 10px;
	border-radius: 5px;
}
#santis_mt_main_area  p.email-sent-successfully {
    background-color: rgba(0, 128, 0, 0.8);
    color: #fff;
    padding: 3px 5px;
    text-align: center;
    border-radius: 5px;
}

#santis_mt_main_area  .social-share {
    margin-top: 10px;
    display: flex;
	flex-direction: column;
    gap: 10px;
}
@media (min-width: 768px) {
#santis_mt_main_area  .social-share {
	flex-direction: row;
}
}

#santis_mt_main_area  .social-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

#santis_mt_main_area  .social-button i {
    font-size: 16px;
}

#santis_mt_main_area  .facebook {
    background-color: #1877F2;
}

#santis_mt_main_area  .facebook:hover {
    background-color: #1558c7;
}

#santis_mt_main_area  .twitter {
    background-color: #1DA1F2;
}

#santis_mt_main_area  .twitter:hover {
    background-color: #0d8adf;
}

#santis_mt_main_area  .linkedin {
    background-color: #0077B5;
}

#santis_mt_main_area  .linkedin:hover {
    background-color: #005582;
}

 [type=button],  [type=submit], button {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: normal;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
        user-select: none;
    background-color: transparent;
    padding: .5rem 1rem;
    font-size: 1rem;
    border-radius: 3px;
    transition: all .3s;
	border: 1px solid var(--primary-color);
	background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: var(--primary-color-text);
}

.accordion-button {white-space: normal;}

.santis-mt-wrap [type=button]:focus, .santis-mt-wrap [type=button]:hover, .santis-mt-wrap [type=submit]:focus, .santis-mt-wrap [type=submit]:hover, .santis-mt-wrap button:focus, .santis-mt-wrap button:hover {
    background: linear-gradient(135deg, var(--primary-color-dark) 0%, var(--primary-color) 100%);
    /*transform: translateY(-2px);*/
	border: 1px solid var(--primary-color-dark);
	color: var(--primary-color-text);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.santis-mt-wrap button.accordion-button[aria-expanded="false"] {
    background: #f0f0f0;
    border: 2px solid #c1c1c1;
}

.santis-mt-wrap button.accordion-button[aria-expanded="true"] {
    background: #93c4e4 !important;
    border: 2px solid #c1c1c1;
}
.santis-mt-wrap button.accordion-button:hover {color:var(--primary-color-dark);}

/* Highlight error emails in preview accordion */
.email-error {
  border: 2px solid #e53935 !important;
  background: #fff6f6;
}
.email-error-message {
  color: #e53935;
  background: #fff6f6;
  border: 1px solid #e53935;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 4px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 10px;
}
.retry-email-btn {
  margin-left: 16px;
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.2s;
}
.retry-email-btn:hover {
  background: #b71c1c;
}

button#sendEmails[disabled] {
    background: #ccc;
    border: 2px solid #ff0000;
    opacity: 0.3;
    cursor: not-allowed;
}
.email-error .accordion-button {
    border: 2px solid #e53935 !important;
    background: #fff6f6 !important;
    color: #e53935 !important;
    font-weight: bold;
  }
  .email-error .accordion-button:hover,
  .email-error .accordion-button:focus {
    background: #ffeaea !important;
    border-color: #b71c1c !important;
    color: #b71c1c !important;
  }

  .pa-extra-questions {
    margin-top: 10px;
	      padding: 0 10px;
  }
  .pa-extra-questions label {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pa-extra-questions input {margin-bottom:10px;}