/* Global Vars */

/* Custom Fonts */
@font-face {
  font-family: 'DIN';
  src: url('../fonts/DIN Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'DIN';
  src: url('../fonts/DIN Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

/* Corner Ribbon */
.corner-ribbon-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 550px;
  height: 250px;
  overflow: hidden;
  z-index: 10;
  pointer-events: none;
}

.corner-ribbon {
  background-color: #e30613;
  color: #fff;
  text-align: center;
  transform: rotate(-35deg);
  position: relative;
  top: 70px;
  left: -129px;
  padding: 15px 0;
  font-weight: bold;
  font-size: 1.9rem;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Top Right Logo */
.logo-top-right {
  position: absolute;
  top: 30px;
  right: 50px;
  z-index: 10;
}

.logo-top-right img {
  width: 400px;
  max-width: 90vw;
}

body,
html {
  margin: 0;
  padding: 0;
  font-family: 'DIN', "Helvetica", "Arial", sans-serif;
  height: 100%;
}

/* Headings use DIN Bold */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'DIN', "Helvetica", "Arial", sans-serif;
  font-weight: bold;
}

.bg-cover {
  background-image: url("../img/bg.jpg");
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  position: relative;
}

.overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 60%);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.overlay-strong {
  background-color: rgba(255, 255, 255, 0.75);
  /* Strong white overlay */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* New Flyer Content Styles */
.flyer-content {
  position: absolute;
  bottom: 200px;
  left: 50px;
  color: #fff;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  text-align: left;
}

.sub-title {
  font-size: 3.5rem;
  font-weight: bold;
  font-family: 'DIN', "Helvetica", "Arial", sans-serif;
  margin: 0 0 0.5rem 0;
}

.main-title {
  font-size: 4.5rem;
  font-weight: bold;
  font-family: 'DIN', "Helvetica", "Arial", sans-serif;
  margin: 0 0 0.5rem 0;
  line-height: 1.1;
}

.date-text {
  font-size: 3rem;
  margin-bottom: 2rem;
}

.action-area {
  font-size: 1.5rem;
  margin-top: 3rem;
}

.email-input {
  padding: 10px;
  width: 300px;
  margin-right: 10px;
  border: none;
  border-radius: 4px;
  margin-bottom: 20px;
}

/* Global Form Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
select:focus {
  outline: none;
  border-color: #e30613;
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.15);
}

input::placeholder {
  color: #999;
}

.btn-primary {
  background-color: #e30613;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  transition: background 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary:hover {
  background-color: rgb(177, 4, 14);
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  transition: background 0.3s;
  border: none;
  /* Explicitly no border */
  cursor: pointer;
  /* Ensures pointer cursor */
  font-size: 1rem;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

/* Admin Dashboard Styles */
.dashboard-container {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
  text-align: left;
}

/* Profile Widget */
.profile-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  font-family: 'DIN', "Helvetica", "Arial", sans-serif;
}

.profile-widget img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  margin-bottom: 10px;
  object-fit: cover;
  background-color: #fff;
}

.profile-widget-text {
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.profile-name {
  font-size: 1.2rem;
  font-weight: bold;
  display: block;
}

.profile-role {
  font-size: 1rem;
  display: block;
}

/* Responsive Adjustments */
@media (max-width: 990px) {
  .main-title {
    font-size: 3rem;
  }

  .sub-title {
    font-size: 2.5rem;
  }

  .date-text {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  /* Mobile / Tablet Portrait Tweaks */

  /* Adjust Logo - make it smaller and keep it top right but manageable */
  .logo-top-right {
    top: 20px;
    right: 20px;
  }

  .logo-top-right img {
    width: 150px;
    /* Much smaller for mobile */
  }

  /* Adjust Ribbon - Scale down significantly */
  .corner-ribbon-wrapper {
    width: 200px;
    height: 200px;
  }

  .corner-ribbon {
    top: 45px;
    left: -70px;
    font-size: 1rem;
    padding: 8px 0;
    width: 300px;
    /* Ensure it covers the corner */
  }

  /* Adjust Content Position */
  .flyer-content {
    bottom: 150px;
    /* Move closer to bottom */
    left: 20px;
    /* Less left padding */
    right: 20px;
    /* Ensure check against right edge */
  }

  .sub-title {
    font-size: 1.5rem;
  }

  .main-title {
    font-size: 2.2rem;
    line-height: 1.2;
  }

  .date-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .action-area {
    font-size: 1rem;
    margin-top: 2rem;
  }

  .email-input {
    width: 100%;
    /* Full width on mobile */
    box-sizing: border-box;
    /* Important for padding */
    margin-bottom: 10px;
    font-size: 16px;
    /* Prevent zoom on iOS */
  }

  .btn-primary {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
  }

  /* Profile Widget Mobile */
  .profile-widget {
    bottom: 20px;
    right: 20px;
  }

  .profile-widget img {
    width: 65px;
    height: 65px;
    border-width: 2px;
  }

  .profile-name {
    font-size: 0.9rem;
  }

  .profile-role {
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {

  /* Optimization for very small screens (320px - 380px) */
  .logo-top-right img {
    width: 120px;
  }

  .corner-ribbon {
    font-size: 0.8rem;
    top: 35px;
    left: -60px;
  }

  .main-title {
    font-size: 1.8rem;
  }

  .sub-title {
    font-size: 1.2rem;
  }
}

/* Star Rating Global Styles */
.star-rating {
  display: flex;
  gap: 30px;
  align-items: center;
}

.star-rating .star {
  font-size: 2.5rem;
  cursor: pointer;
  color: #ddd;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}

.star-rating .star:hover {
  transform: scale(1.2);
}

.star-rating .star.active {
  color: #ffc107;
}

.star-rating .star.hovered {
  color: #ffdb58;
}

.star-rating-display {
  display: inline-flex;
  gap: 2px;
}

.star-rating-display .star {
  color: #ffc107;
  font-size: 0.9rem;
}

.star-rating-display .star.empty {
  color: #ddd;
}

.rating-label {
  font-size: 0.85rem;
  color: #666;
  margin-left: 8px;
}

.rating-description {
  font-size: 0.8rem;
  color: #888;
  margin-top: 4px;
}

/* Button Loading Spinner */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading .btn-text {
  visibility: hidden;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 250px;
  padding: 15px 20px;
  border-radius: 8px;
  color: #fff;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success {
  background-color: #2e7d32;
  border-left: 5px solid #1b5e20;
}

.toast.error {
  background-color: #d32f2f;
  border-left: 5px solid #b71c1c;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}