@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&display=swap");

body,
html {
  font-family: "IBM Plex Sans", sans-serif;
  background-color: #f5f5f5;  /* Light grey background */
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 16px 24px;
  position: relative;
  max-width: 600px;  /* Limit content width */
  margin: 0 auto;    /* Center content */
}

.page-title {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  font-weight: 500;
  color: #000000;
  font-size: 18px;
}

.language-switch {
  position: absolute;
  right: 16px;
  z-index: 10;
}

.lang-button {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  color: #666;
  font-weight: 500;
  transition: color 0.3s;
}

.lang-button.selected {
  color: #1976d2;
}

.cards {
  display: flex;
  flex-direction: column;
  align-items: stretch; 
  gap: 24px;
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  margin: 0;  /* Ensure no margin */
}

.card .title {
  width: 100%;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 16px;
  box-sizing: border-box;
}

.card .title .text-wrapper {
  margin: 0;
  padding: 0;
  display: block;
  width: 100%;
}

.temperature-input {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
}

.temperature-select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 16px;
  font-family: "IBM Plex Sans", sans-serif;
  background-color: white;
  height: 44px;  /* Match submit button height */
}

.temperature-unit {
  font-size: 16px;
  color: #666;
  margin-left: 8px;
}

.submit-button {
  display: flex;
  flex-direction: column;
  height: 44px;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  background-color: #1976d2;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin: 0;  /* Remove margin-top */
  box-sizing: border-box;
}

.submit-button:disabled {
  background-color: #e0e0e0;
  pointer-events: none;
}

.submit-button .title {
  font-family: "IBM Plex Sans", sans-serif;
  position: relative;
  width: fit-content;
  font-weight: 500;
  color: #ffffff;
  font-size: 14px;
  text-align: center;
  letter-spacing: 0;
  line-height: 14px;
  white-space: nowrap;
}

.submit-button:disabled .title {
  color: #9e9e9e;
}

/* Success Message Styling */
.success-message {
  width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  justify-content: center;
  position: relative;
  margin: 0 auto;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.success-message.fade-in {
  opacity: 1;
}

.success-text {
  font-size: 16px;
  margin: 16px 0;
}

/* Spinner */
.spinner {
  border: 4px solid #ffffff;
  border-top: 4px solid #1976d2;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin: auto;
}

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