/* Login Feature Styles */

.login-container {
  position: relative;
  width: 400px;
  max-width: 90%;
  padding: 30px;
  background-color: #135909;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  width: 120px;
  margin-bottom: 25px;
  border-radius: 8px;
}

.instruction-text {
  margin-bottom: 15px;
  color: #ddd;
  min-height: 1.2em; /* Ensure it takes up space even if empty, though we will fill it */
  font-size: 14px;
}

.input-group {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 15px;
}

#api-key,
#script-url-input {
  padding: 15px;
  border: none;
  border-radius: 5px 0 0 5px;
  font-size: 16px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

#api-key:focus,
#script-url-input:focus {
  outline: none;
}

#login-button,
#save-url-button {
  padding: 15px 25px;
  border: none;
  border-radius: 0 5px 5px 0;
  background-color: #f0ad4e;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

#login-button:hover,
#save-url-button:hover {
  background-color: #ec971f;
}

.action-area {
  min-height: 30px; /* Fixed height for buttons area */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.status-container {
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
  box-sizing: border-box;
}

#login-status {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.status-message {
  padding: 8px 15px;
  border-radius: 5px;
  display: inline-block;
  text-align: center;
  max-width: 100%;
  word-wrap: break-word;
  box-sizing: border-box;
}

.success {
  background-color: #5cb85c;
  color: #fff;
}

.error {
  background-color: #d9534f;
  color: #fff;
}

.info {
  background-color: #5bc0de;
  color: #fff;
}

#change-url-button,
#cancel-url-button {
  background: none;
  border: none;
  color: #a0d4a0;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  opacity: 0.8;
  transition: opacity 0.3s;
  padding: 5px;
}

#change-url-button:hover,
#cancel-url-button:hover {
  opacity: 1;
  color: #fff;
}

@media (max-width: 480px) {
  .login-container {
    width: 95%;
    padding: 20px;
  }

  .input-group {
    flex-direction: column;
  }

  #api-key,
  #script-url-input {
    border-radius: 5px;
    margin-bottom: 10px;
  }

  #login-button,
  #save-url-button {
    border-radius: 5px;
    width: 100%;
  }
}
