/* ==================================
   1. MODAL LAYOUT
================================== */

.cmt-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.65);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cmt-modal.active {
  opacity: 1;
  pointer-events: auto;
}


/* ==================================
   2. MODAL CONTENT
================================== */

.cmt-modal-content {
  position: relative;

  width: 90%;
  max-width: 720px;

  margin-top: 50px;

  max-height: 75vh;
  overflow-y: auto;
  overflow-x: hidden;

  padding: 40px 30px;
  border-radius: 7px;

  background: linear-gradient(135deg, #0e0c0c, #672c2c);
  color: antiquewhite;

  box-shadow: 0 20px 60px rgba(0,0,0,0.6);

  transform: translateY(-10px);
  animation: modalFade 0.35s ease forwards;

  box-sizing: border-box;
}


/* ==================================
   3. INNER CONTAINER (BOX)
================================== */

.boxquote {
  display: flex;
  flex-direction: column;
  align-items: center;

  max-width: 600px;
  margin: 0 auto;
  padding: 20px;

  background: rgba(255, 255, 255, 0.1);

  border-left: 4px solid #fff;
  border-radius: 4px;
}


/* ==================================
   4. TYPOGRAPHY
================================== */

.boxquote h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
}

.boxquote h3 {
  margin: 10px 0 5px;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
}

.boxquote p {
  margin: 0 0 40px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  color: #ddd;
}


/* ==================================
   5. FORM STRUCTURE
================================== */

.cmt-modal-content form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.cmt-modal-content label {
  font-weight: 600;
}

form {
  display: flex;
  flex-direction: column;
  gap: 49px; /* space BETWEEN groups */
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 9px; /* space INSIDE group (label → input) */
}

label[for="consent"] {
  align-items: flex-start;
  gap: 8px;
}

/* ==================================
   6. FORM ELEMENTS
================================== */

.cmt-modal-content input,
.cmt-modal-content textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;

  border: 1px solid #aaa;
  border-radius: 5px;

  background-color: #fff;
  color: #000;

  box-sizing: border-box;
}

.cmt-modal-content textarea {
  resize: vertical;
}

.cmt-modal-content input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
}


/* ==================================
   7. SPECIAL FIELDS
================================== */

#cle_display {
  background: rgba(255,255,255,0.08);
  color: #ddd;
  cursor: not-allowed;
}

#cle {
  background: rgba(255,255,255,0.08);
  color: #ddd;
  border: 1px solid rgba(255,255,255,0.25);
  font-style: italic;
  cursor: default;
}

#charCount {
  font-size: 0.85rem;
  color: #aaa;
  text-align: right;
  margin-top: -10px;
}


/* ==================================
   8. LINKS
================================== */

.cmt-modal-content a {
  color: #d8c9a3;
  text-decoration: underline;
}

.cmt-modal-content a:hover {
  color: #ffd6d6;
}

label[for="consent"] {
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #ddd;
}


/* ==================================
   9. BUTTONS
================================== */

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  font-size: 0.9rem;
  line-height: 1.5;
  color: #ddd;
}

.consent-label input {
  margin-top: 4px; /* aligns checkbox with first line */
}

.cmt-modal-content button {
  align-self: flex-start;

  font-family: Georgia, serif;
  font-weight: 600;

  padding: 12px 25px;

  border: 1px solid #4e0000;
  border-radius: 5px;

  background-color: transparent;
  border: 1px solid #fff1cd;
  color: #d8c9a3;

  cursor: pointer;
  transition: all 0.3s ease;
}

.cmt-modal-content button:hover {
  background-color: #f7f7f7;
  color: #880000;
  font-weight: 800;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(237, 219, 173, 0.4);
}


/* ==================================
   10. CLOSE BUTTON
================================== */

.cmt-close {
  position: absolute;
  top: 14px;
  right: 20px;

  font-size: 28px;
  color: antiquewhite;

  cursor: pointer;
  user-select: none;

  transition: color 0.2s ease;
}

.cmt-close:hover {
  color: #ffd6d6;
}


/* ==================================
   11. ANIMATION
================================== */

@keyframes modalFade {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* ==================================
   12. RESPONSIVE
================================== */

@media (max-width: 768px) {

  .cmt-modal-content {
    width: 95%;
    padding: 20px 15px;
  }

  .boxquote {
    max-width: 100%;
    padding: 15px;
  }

  .boxquote h2 {
    font-size: 1.4rem;
  }

  .boxquote h3 {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .cmt-close {
    top: 10px;
    right: 15px;
    font-size: 24px;
  }
}