@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fff;
  color: #333;
}

/* Disconnect notification styles */
.disconnect-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-width: 400px;
  animation: slideIn 0.3s ease-out;
}

.disconnect-content {
  display: flex;
  align-items: flex-start;
  padding: 16px;
  gap: 12px;
}

.disconnect-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.disconnect-text {
  flex-grow: 1;
  color: #856404;
  line-height: 1.4;
}

.disconnect-text strong {
  color: #533f03;
}

.disconnect-text small {
  opacity: 0.8;
  font-size: 12px;
}

.disconnect-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #856404;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
}

.disconnect-close:hover {
  background-color: #f8f5e4;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

#myDiv p,
#myDiv li {
  color: inherit;
}

#myDiv h1,
#myDiv h2,
#myDiv h3,
#myDiv h4,
#myDiv h5,
#myDiv h6 {
  color: inherit;
}

/* Table styling */
#myDiv table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  background-color: #fff;
  border: 1px solid #737171;
}

#myDiv th,
#myDiv td {
  padding: 12px 15px;
  text-align: left;
  border: 1px solid #737171;
}

#myDiv th {
  background-color: #bbd8ff;
  font-weight: 600;
  color: #333;
}

#myDiv tr:hover {
  background-color: #f0f7ff;
}

/* Responsive table */
@media (max-width: 480px) {
  #myDiv table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  #myDiv th,
  #myDiv td {
    padding: 8px 12px;
    font-size: 14px;
  }
}

.container {
  max-width: 1114px;
  margin: 40px auto;
  padding: 0 20px;
}

.search-container {
  background-color: #0a0e19;
  border-radius: 12px;
  padding: 50px 50px 6px 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header {
  text-align: center;
  margin-bottom: 50px;
  color: white;
  font-weight: 700;
}

.header h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  color: white !important;
  line-height: 1.5;
}

.highlight {
  color: #4285f4;
  font-weight: 700;
}

.search-box {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 52px;
  overflow: hidden;
  margin-bottom: 45px;
  height: 60px;
}

.search-icon {
  padding-left: 16px;
  display: flex;
  align-items: center;
}

.search-img {
  width: 24px;
  height: 24px;
}

.search-input {
  flex-grow: 1;
  padding: 16px 16px 16px 10px;
  border: none;
  font-size: 22px;
  outline: none;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  color: rgba(10, 14, 25, 0.5);
}

.search-input:focus,
.search-input:not(:placeholder-shown) {
  color: #000;
}

.controls-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  margin-bottom: 30px;
}

.category-label {
  color: white;
  font-size: 20px;
  font-weight: 600;
  text-align: left;
  padding-left: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.inputs-container {
  display: flex;
  flex-direction: row;
  gap: 16px;
  width: 100%;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}

.input-label {
  color: white;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dropdown-wrapper,
.input-wrapper {
  width: 100%;
}

.select-container {
  position: relative;
  width: 100%;
}

.select-container::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url('./static/images/dropdown_arrow.png');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.dropdown-field,
.location-field {
  width: 100%;
  height: 52px;
  padding: 0 70px 0 20px;
  background-color: white;
  border: none;
  border-radius: 52px;
  font-size: 20px;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: 'Roboto', sans-serif;
}

.dropdown-field {
  cursor: pointer;
  font-weight: 400;
  color: #0a0e19;
}

.location-field {
  padding-left: 20px;
  padding-right: 20px;
  font-weight: 400;
  color: rgba(10, 14, 25, 0.5);
  cursor: text;
}

.location-field:focus,
.location-field:not(:placeholder-shown) {
  color: #000;
}

.button-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 24px;
}

.generate-button {
  background-color: #4285f4;
  color: white;
  font-weight: 700;
  padding: 0 25px;
  border: none;
  border-radius: 52px;
  cursor: pointer;
  font-size: 20px;
  transition: background-color 0.2s;
  height: 52px;
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  position: relative;
  font-family: 'Roboto', sans-serif;
  gap: 8px;
}

.generate-button:hover {
  background-color: #3367d6;
}

.generate-button:disabled {
  background-color: #3b78dd;
  cursor: not-allowed;
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.button-text {
  transition: opacity 0.2s ease;
}

.error-text {
  color: #f44336;
  font-size: 14px;
  margin-top: 5px;
  display: none;
}

.objective-error {
  color: #f44336;
  font-size: 14px;
  text-align: center;
  margin-top: 16px;
  display: none;
  width: 100%;
}

/* Hide optgroup labels but keep options visible */
optgroup {
  font-size: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: none;
  color: transparent;
}

optgroup option {
  font-size: 16px;
  padding: 8px 12px;
  color: #0a0e19;
}

/* Style for disabled select */
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: rgba(255, 255, 255, 0.9);
}

select:disabled + .select-container::after {
  opacity: 0.6;
}

/* Style for the dropdown options */
.dropdown-field option {
  background-color: white;
  color: #0a0e19;
  padding: 8px 12px;
}

.dropdown-field option[style*="display: none"] {
  display: none !important;
}

.dropdown-field option:disabled {
  color: rgba(10, 14, 25, 0.5);
}

.dropdown-field option:checked {
  background-color: #4285f4;
  color: white;
}

/* Hide the optgroup label in the dropdown */
.dropdown-field optgroup {
  color: transparent;
}

/* Password protection styles */
.password-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f5f7;
}

.password-card {
  background-color: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.password-logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #4285f4;
}

.password-input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.password-input.error {
  border-color: #f44336;
}

.error-message {
  color: #f44336;
  margin-bottom: 15px;
}

.password-button {
  background-color: #4285f4;
  color: white;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.password-button:hover {
  background-color: #3367d6;
}

#app-content {
  display: none;
}

.br {
  display: none;
}

/* Responsive styles */
@media (max-width: 768px) {
  .inputs-container {
    flex-direction: column;
  }

  .input-group {
    width: 100%;
  }

  .category-label {
    margin-bottom: 5px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {

  .container {
    margin: 32px auto;
    padding: 0 16px;
  }

  .search-container {
    padding: 44px 16px 20px 16px;
  }

  .header h1 {
    font-size: 22px;
    line-height: 1.8;
  }

  .search-box {
    margin-bottom: 32px;
    height: 47px;
  }

  .search-input {
    font-size: 14px;
  }

  .search-img {
    width: 14px;
    height: 14px;
  }

  .select-container::after {
    width: 21px;
    height: 12px;
  }
  .dropdown-wrapper{
    height: 47px;
  }
  .dropdown-field {
    font-size: 16px;
  }
  .location-wrapper{
    height: 47px;
  }
  .location-field {
    font-size: 16px;
  }

  .generate-button {
    font-size: 16px;
    width: 100%;
    height: 47px;
  }
  .profile-header{
    padding: 0 16px !important;
  }
  .profile-header h2 {
    font-size: 14px !important;
  }

  .copy-button {
    border-radius: 5px !important;
    width: auto !important;
    height: 30px !important;
    font-size: 14px !important;
  }
  #responseText {
    padding: 24px 16px !important;
  }
  .response-content{
    margin-top: 35px;
  }
  .response-content h1,
  .response-content h2,
  .response-content h3 {
    font-size: 16px;
  }
  .response-content ol{
    padding-left: 18px !important;
  }
  .response-content ul{
    padding-left: 26px !important;
  }
  .response-content li > ul > li > ul {
    padding-left: 18px !important;
  }
  .feedback-container{
    margin-top: 32px !important;
    margin-bottom: 37px !important;
    padding: 24px 16px !important;
    border-radius: 10px !important;
  }
  .feedback-title{
    font-size: 16px !important;
    margin-bottom: 24px !important;
  }
  .feedback-buttons{
    margin-bottom: 24px !important;
  }
  .feedback-button{
    width: 37px !important;
    height: 37px !important;
  }
  .feedback-button img{
    width: 22px !important;
    height: 22px !important;
  }
  .feedback-subtitle{
    font-size: 14px !important;
    margin-bottom: 16px !important;
  }
  .feedback-optional{
    font-size: 14px !important;
  }
  .feedback-textarea{
    min-height: 95px !important;
    margin-bottom: 16px !important;
  }
  .feedback-submit{
    height: 37px !important;
    width: 100% !important;
    font-size: 14px !important;
    border-radius: 6px !important;
  }
  .feedback-confirmation{
    padding: 24px !important;
  }
  .feedback-confirmation-text{
    font-size: 12px !important;
  }
  .feedback-success-icon{
    top: 14px !important;
    right: 16px !important;
    width: 13px !important;
    height: 13px !important;
  }
  .feedback-confirmation-button{
    padding: 0px 25px !important;
    font-size: 12px !important;
    border-radius: 5.98px !important;
    height: 32px !important;
  }
  .br {
    display: inline;
    height: 0;
  }

  .error-text {
    font-size: 12px;
  }
}

/* Dropdown menu styling */
select#category {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: white;
  border-radius: 52px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

/* Style when the select receives focus */
select#category:focus {
  border-color: rgba(10, 14, 25, 0.1);
  box-shadow: 0 5px 15px rgba(10, 14, 25, 0.15);
  outline: none;
}

/* Style for each option in the dropdown */
select#category option {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 16px;
  padding: 12px 20px;
  color: #000000;
  text-align: left;
  border-bottom: 1px solid rgba(10, 14, 25, 0.1);
  background-color: white !important;
}

select#category option:hover,
select#category option:focus {
  background-color: #f5f5f7;
}

select#category option:first-child {
  border-radius: 10px 10px 0 0;
}

select#category option:last-child {
  border-bottom: none;
  border-radius: 0 0 10px 10px;
}

/* Chrome and Safari specific styles */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  select#category option {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}

/* Firefox specific styles */
@-moz-document url-prefix() {
  select#category {
    padding-right: 25px;
    text-indent: 0.01px;
    text-overflow: '';
  }

  select#category option {
    border-radius: 0;
  }
}

/* Override browser dropdown styling */
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {

  /* IE10+ CSS */
  select#category option {
    background: white !important;
  }
}

/* Target Chrome, Safari, Edge */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  select#category option {
    background-color: white !important;
  }
}

/* Specifically target dropdown - webkit browsers */
_::-webkit-full-page-media,
_:future,
:root select#category {
  border-radius: 10px;
}

/* For Firefox */
@-moz-document url-prefix() {
  select#category {
    border-radius: 10px;
  }
}

select#category {
  background-color: white;
}

select#category option {
  background-color: white !important;
}

select#category option:first-child {
  border-radius: 10px 10px 0 0;
}

select#category option:last-child {
  border-bottom: none;
  border-radius: 0 0 10px 10px;
}

/* Results container styling */
.response-content {
  background-color: #E7F1FF;
  border-radius: 12px;
  padding: 0;
  margin-top: 30px;
  font-family: 'Roboto', sans-serif;
  display: none;
  position: relative;
  overflow: hidden;
}

#responseText {
  margin-top: 0;
  padding: 25px 30px 30px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #E7F1FF;
}

.response-content h1,
.response-content h2,
.response-content h3 {
  font-family: 'Roboto', sans-serif !important;
  color: #000000;
}

.response-content p,
.response-content li {
  font-family: 'Roboto', sans-serif !important;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: #000000;
}

.profile-header {
  background-color: #D3E3FD;
  padding: 0 24px;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-radius: 0;
  text-align: left;
  position: relative;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  height: 71px;
  display: flex;
  align-items: center;
}

.profile-header h2 {
  font-size: 22px;
  font-weight: 500 !important;
  margin: 0;
  color: #000 !important;
  text-align: left;
  margin-top: 0;
}

.copy-button {
  background-color: #1A73E8;
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  width: 85px;
  height: 46px;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-button:hover {
  background-color: #1f64bf;
}

/* override existing markdown heading styles */
#responseText h1,
#responseText h2,
#responseText h3,
#responseText h4,
#responseText h5,
#responseText b {
  font-weight: 600 !important;
  color: #2d7be9 !important;
}

/* Feedback form styling */
.feedback-container {
  margin-top: 40px;
  margin-bottom: 40px;
  padding: 30px;
  border: 1px solid rgba(10, 14, 25, 0.1);
  border-radius: 12px;
  display: none;
  background-color: #fff;
  position: relative;
  overflow: hidden;
  max-width: 1114px;
  margin-left: auto;
  margin-right: auto;
}

.feedback-title {
  font-family: 'Roboto', sans-serif;
  font-weight: normal;
  font-size: 25px;
  color: #333;
  margin-top: 0;
  margin-bottom: 20px;
}

.feedback-subtitle {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 17.7px;
  color: #0A0E19;
  margin-bottom: 20px;
}

.feedback-optional {
  color: #777;
  font-weight: normal;
}

.feedback-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.feedback-button {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-button.thumbs-up {
  border: 1px solid rgba(58, 131, 235, 0.5);
}

.feedback-button.thumbs-down {
  border: 1px solid rgba(47, 123, 233, 0.5);
}

.feedback-button img {
  width: 30px;
  height: 30px;
}

.feedback-button.selected {
  background-color: rgba(11, 100, 225, 0.2);
  border-color: rgba(58, 131, 235, 1);
}

.feedback-textarea {
  width: 100%;
  min-height: 100px;
  border: 0.75px solid rgba(0, 0, 0, 0.25);
  border-radius: 13px;
  padding: 15px;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 20px;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #3A83EB;
}

.feedback-submit {
  background-color: #3A83EB;
  color: white;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 17.7px;
  padding: 12px 25px;
  height: 48px;
  border: none;
  border-radius: 13px;
  cursor: pointer;
  float: right;
}

.feedback-submit:hover {
  background-color: #336cbc;
}

.feedback-submit:disabled {
  background-color: #9abbee;
  cursor: not-allowed;
}

/* Feedback confirmation UI */
.feedback-confirmation {
  margin-top: 40px;
  margin-bottom: 40px;
  padding: 45px;
  border: 1px solid rgba(10, 14, 25, 0.25);
  border-radius: 12px;
  display: none;
  background-color: #fff;
  position: relative;
  overflow: hidden;
  max-width: 1114px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.feedback-confirmation-text {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 22px;
  color: #0A0E19;
  line-height: 1.8;
  margin-bottom: 30px;
  text-align: center;
}

.feedback-confirmation-button {
  background-color: #3A83EB;
  color: white;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 17.7px;
  padding: 12px 25px;
  height: 48px;
  border: none;
  border-radius: 13.3px;
  cursor: pointer;
  display: inline-block;
}

.feedback-confirmation-button:hover {
  background-color: #336cbc;
}

.feedback-success-icon {
  position: absolute;
  top: 35px;
  right: 35px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.feedback-success-icon:hover {
  transform: scale(1.1);
}

/* Close button for feedback */
.feedback-close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 24px;
  line-height: 24px;
  text-align: center;
  color: #777;
}

.feedback-close-button:hover {
  color: #333;
}

.version-container {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.version-text {
  color: #000;
  font-size: 15px;
  font-weight: 400;
  font-family: 'Roboto', sans-serif;
}

@media (max-width: 480px) {
  .version-text {
    font-size: 13px;
  }
}