@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
@import './theme.css';

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #FDF7F1; /* Fallback default color */
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.theme-applied {
    background-color: var(--background);
}

.container {
    max-width: 600px;
    width: 100%;
    padding: 30px;
    background: var(--container-background);
    border-radius: 15px;
    border: 3px solid #333;
    box-shadow: 4px 4px 0px #333;
    margin: 0 auto;
    box-sizing: border-box;
}

.title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    background: white;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #000000;
}

.btn {
    width: 100%;
    padding: 15px;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.btn-primary {
    background-color: var(--btn-primary);
    color: black;
}

.btn-primary:hover {
    background-color: var(--btn-primary-hover);
    transform: translateY(2px);
    color: black;
}

.btn-danger {
    background-color: var(--btn-danger);
    color: black;
}

.btn-danger:hover {
    background-color: var(--btn-danger-hover);
    transform: translateY(2px);
    color: black;
}

.link-btn {
    background: none;
    border: none;
    color: var(--link-btn);
    text-decoration: underline;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    padding: 10px;
    width: 100%;
}

.welcome-text {
    font-size: 20px;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.screen {
    display: none;
}

.screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.error {
    color: #f44336;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

.success {
    color: #4CAF50;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Footer */
.footer {
  background-color: #F4F7F9; /* Default background */
  padding: 20px 0;
  margin-top: auto;
  text-align: center;
  font-size: 14px;
  color: #6c757d; /* Default text color */
  transition: background-color var(--theme-transition-duration) ease, color var(--theme-transition-duration) ease;
}

.footer.profile-footer {
  background-color: var(--background); /* Themed background */
  color: var(--footer-text); /* Themed text color */
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

/* Footer link overrides */
.footer-link {
  border: none !important;       /* remove doodle.css button border */
  background: none !important;   /* strip any doodle background */
  color: #6c757d; /* Default link color */
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  padding: 0;
  transition: color 0.2s ease;
}

.footer.profile-footer .footer-link .footer-links .footer-copy{
  color: var(--footer-text); /* Themed link color */
}

.footer-link:hover {
  color: var(--link-btn-hover);
  text-decoration: underline;    /* optional hover underline */
}

.footer-copy {
    margin-top: 15px;
}

/* Dashboard Styles */
.dashboard-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-container h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.date-range-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 10px;
}

.range-button {
  padding: 8px 16px;
  background-color: var(--btn-back);
  border: 2px solid #333;
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}

.range-button:hover {
  background-color: var(--btn-back-hover);
  transform: translateY(-2px);
}

.range-button.active {
  background-color: var(--btn-primary);
  border-color: #000;
}

.charts-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
}

.chart-wrapper {
  background-color: var(--container-background);
  border: 3px solid #333;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 4px 4px 0px #333;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.chart-wrapper h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px 15px;
    max-width: 90%;
    box-sizing: border-box;
    margin: 0 auto;
  }
  
  .dashboard-container {
    padding: 20px 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
  }
  
  .chart-wrapper {
    padding: 20px 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto 30px auto;
  }

  .title {
    font-size: 24px;
    word-break: break-word;
  }

  .btn {
    padding: 12px;
    font-size: 16px;
  }

  .form-input {
    padding: 12px;
    font-size: 14px;
  }

  /* Profile specific styles */
  #profileHeader img, 
  #profileHeader > div > div {
    width: 120px !important;
    height: 120px !important;
  }

  #profileHeader > div > div {
    font-size: 48px !important;
  }

  /* Content blocks responsive styles */
  .content-blocks-container {
    padding: 0;
  }

  .content-block-actions {
    flex-direction: column;
  }

  .content-block-actions button {
    width: 100%;
    margin-bottom: 8px;
  }

  /* EditProfile specific styles */
  .url-input-group {
    flex-direction: column;
  }

  .url-input-group input {
    width: 100%;
    margin-bottom: 8px;
  }

  .url-input-group button {
    width: 100%;
  }

  /* Dashboard styles */
  .date-range-selector {
    flex-direction: column;
    align-items: center;
  }
  
  .range-button {
    width: 100%;
    max-width: 200px;
  }

  .screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
    max-width: 90%;
    box-sizing: border-box;
  }
}