/* ============================
   Contact Page Styles (ct-)
   ============================ */

/* Root Variables */
:root {
  --primary-color: #af0379;
  --accent-color: #ed7117;
  --bg-color: #FFFFFC;
  --text-color: #af0379;
  --input-radius: 6px;
  --button-radius: 12px;
  --font-family: 'Segoe UI', sans-serif;
}

/* Base Styles */
body {
  background-color: var(--bg-color);
  font-family: var(--font-family);
  color: var(--text-color);
  padding: 30px;
  margin: 0;
}

/* Labels */
.ct-label {
  display: block;
  font-weight: bold;
  color: var(--primary-color);
  font-size: 18px;
  margin: 20px 0 6px 15px;
}

/* Container */
.ct-container {
  display: flex;
  justify-content: center;
  padding: 10px 20px;
  max-width: 800px;
  margin: auto;
}

/* Form Box */
.ct-form {
  width: 100%;
  background: var(--bg-color);
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.ct-form h4 {
  margin-top: 0;
  color: var(--primary-color);
  text-decoration: underline;
  text-align: center;
}

/* Form Inputs */
.ct-form :is(input, select, textarea) {
  width: 95%;
  padding: 10px;
  margin: 0 15px 10px 15px;
  border: 1px solid var(--primary-color);
  border-radius: var(--input-radius);
  font-size: 14px;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all 0.3s ease;
  box-sizing: border-box;
  line-height: 1.5;
  font-family: inherit;
}

.ct-form :is(input, select, textarea):focus {
  border-color: var(--accent-color);
  color: var(--accent-color);
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

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

.ct-form select option {
  color: var(--text-color);
  background-color: var(--bg-color);
}

.ct-form select option:checked,
.ct-form select option:hover {
  background-color: var(--accent-color);
  color: #FFFFFC;
}

/* Submit Button */
.ct-form button {
  margin: 15px 0 0 15px;
  padding: 12px 20px;
  width: 95%;
  background-color: var(--primary-color);
  color: var(--bg-color);
  border: none;
  border-radius: var(--button-radius);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-family: inherit;
}

.ct-form button:hover,
.ct-form button:focus {
  background-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(237, 113, 23, 0.3);
}

/* Form Message */
#ct-form-message {
  margin-top: 15px;
  font-weight: 600;
  color: var(--text-color);
}

/* Toast Popup */
#ct-popup-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4BB543;
  color: #FFFFFC;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  font-size: 16px;
  display: none;
  z-index: 9999;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0%   { opacity: 0; transform: translate(-50%, 20px); }
  10%  { opacity: 1; transform: translate(-50%, 0); }
  90%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 20px); }
}

/* CAPTCHA Wrapper */
.ct-captcha-wrapper {
  margin-left: 15px;
  margin-right: 15px;
  margin-top: 10px;
  margin-bottom: 15px;
  width: 95%;
}

/* Styled Select */
.ct-styled-select {
  font-size: 14px;
  padding: 10px;
  height: auto;
  line-height: 1.4;
  box-sizing: border-box;
}

.ct-styled-select option {
  font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
  body {
    padding: 15px;
  }

  .ct-container {
    padding: 20px 10px;
  }

  .ct-form {
    padding: 20px;
    border-radius: 8px;
    box-shadow: none;
  }

  .ct-form h4 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .ct-label {
    font-size: 16px;
  }

  .ct-form :is(input, select, textarea) {
    font-size: 14px;
    padding: 10px;
    margin-bottom: 20px;
  }

  .ct-form button {
    width: 100%;
    font-size: 18px;
    padding: 16px;
    margin-top: 25px;
    margin-left: 0;
  }

  #ct-popup-toast {
    font-size: 14px;
    padding: 12px 20px;
  }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #1a1a1a;
    --text-color: #f1f1f1;
  }

  body {
    background-color: var(--bg-color);
    color: var(--text-color);
  }

  .ct-form {
    background: #222;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
  }

  .ct-form :is(input, select, textarea) {
    background-color: #333;
    color: var(--text-color);
    border-color: var(--primary-color);
  }

  .ct-form button {
    background-color: var(--primary-color);
    color: #fff;
  }

  #ct-popup-toast {
    background-color: #00a676;
  }
}
