/* Component Styles - Cards, Buttons, Forms, etc. */

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  transform-origin: center bottom;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 20px;
}

/* Disable hover effects on touch devices */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  }
}

.card-body {
  padding: 2rem;
  background-color: #ffffff;
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 1.5rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 1rem;
  color: #6c757d;
}

/* Mobile card adjustments */
@media (max-width: 768px) {
  .card {
    border-radius: 8px;
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-title {
    font-size: 1.25rem;
  }
  
  .card-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .card-body {
    padding: 0.75rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .card-text {
    font-size: 0.9rem;
  }
}

.equal-height-cards .card {
  display: flex;
  flex-direction: column;
}

.equal-height-cards .card-body {
  flex: 1;
}

.discover-card {
  overflow: hidden;
}

/* Buttons */
.btn,
.nav-link {
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  touch-action: manipulation;
}

/* Mobile button adjustments */
@media (max-width: 576px) {
  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .btn:last-child {
    margin-bottom: 0;
  }
  
  /* Inline buttons should stack */
  .btn-group-vertical .btn,
  .d-flex .btn:not(:last-child) {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
}

.teacher_page_btn-custom {
  margin-right: 4px;
  margin-bottom: 4px;
}

.teacher_page_btn-promote {
  background-color: #FFD700;
  color: black;
}

.teacher_page_btn-list {
  background-color: #28A745;
  color: white;
}

.teacher_page_btn-stats {
  background-color: #17A2B8;
  color: white;
}

.teacher_page_btn-edit {
  background-color: #007BFF;
  color: white;
}

.teacher_page_btn-delist {
  background-color: #FFC107;
  color: black;
}

.teacher_page_btn-remove {
  background-color: #DC3545;
  color: white;
}

.submit-button {
  background-color: #32a852;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.submit-button:hover {
  background-color: #289c47;
}

.pay-upfront {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: #1e88e5;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

/* Back to Top Button */
#back-to-top,
.back-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

/* Forms */
.signup-container {
  max-width: 500px;
  width: 90%;
  margin: 50px auto;
  padding: 20px;
}

.login-container {
  max-width: 400px;
  width: 90%;
  margin: 50px auto;
  padding: 20px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 16px; /* Prevents iOS zoom */
  min-height: 44px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* Mobile form adjustments */
@media (max-width: 576px) {
  .signup-container,
  .login-container {
    width: 100%;
    margin: 20px auto;
    padding: 1rem;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="date"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px; /* Critical for iOS */
    padding: 0.75rem;
  }
  
  /* Stack form groups */
  .form-row {
    flex-direction: column;
  }
  
  .form-row .col,
  .form-row [class*="col-"] {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Profile Cards */
.profile-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #4f8cff;
  margin: 1.5rem auto;
  vertical-align: middle;
}

.profile-card {
  border-radius: 23px;
  border: 1px solid rgba(68, 68, 68, 0.1);
  box-shadow: 0px 8px 12px 6px rgba(0, 0, 0, 0.15),
    0px 4px 4px 0px rgba(0, 0, 0, 0.3);
  background-color: #f3deed;
  display: flex;
  width: 200px;
  max-width: 200px;
  padding: 10px 0 27px 0;
  flex-direction: column;
  align-items: center;
  font-family: 'Baloo 2', -apple-system, Roboto, Helvetica, sans-serif;
  white-space: nowrap;
  text-align: center;
  margin: 20px auto;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.profile-card:hover {
  transform: translateY(-5px);
}

.profile-name {
  color: rgba(55, 66, 59, 1);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  margin: 9px 0 0 0;
}

.profile-role {
  color: #444444;
  font-size: 13px;
  font-weight: 400;
  margin: 9px 0 12px 0;
}

.profile-view-btn {
  background-color: transparent;
  border: 1px solid #4f8cff;
  color: #4f8cff;
  padding: 6px 16px;
  border-radius: 15px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.profile-view-btn:hover {
  background-color: #4f8cff;
  color: white;
}

/* Dashboard Cards */
.dashboard-card {
  margin-top: 20px;
}

.dashboard-stat {
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #dfdfdf;
  margin-bottom: 20px;
}

/* Flash Messages */
.flash-messages-container {
  margin: 1rem 0;
}

/* Hero Section */
.hero-section {
  position: relative;
  background-image: url('/static/images/banner.png');
  background-size: cover;
  background-position: center;
  height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
}

