/* ------------------------------------------------------------
   THEME VARIABLES
------------------------------------------------------------ */
:root {
  --tw-bg: #ffffff;
  --tw-text: #000000;
  --tw-overlay: rgba(0,0,0,0.45);

  --tw-border: #ccc;
  --tw-radius: 12px;

  --tw-btn-bg: #f28c83;
  --tw-btn-text: #ffffff;
  --tw-btn-radius: 6px;

  --tw-btn-bg-secondary: #f2f2f2;
  --tw-btn-text-secondary: #000000;
}


/* ------------------------------------------------------------
   MODAL WRAPPER
------------------------------------------------------------ */
#tw-contact-modal {
  position: fixed;
  inset: 0;
  background: var(--tw-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#tw-contact-modal.open {
  display: flex;
}


/* ------------------------------------------------------------
   MODAL CONTENT PANEL
------------------------------------------------------------ */
.tw-modal-content {
  background: var(--tw-bg);
  padding: 24px;
  width: 90%;
  max-width: 420px;
  border-radius: var(--tw-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  position: relative;
  font-family: system-ui, sans-serif;
}

.tw-modal-content * {
  box-sizing: border-box;
}

.tw-modal-content h2 {
  user-select: none;
}

/* ------------------------------------------------------------
   HEADER + CLOSE BUTTON
------------------------------------------------------------ */
.tw-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}


/* ------------------------------------------------------------
   FORM FIELDS
------------------------------------------------------------ */
#tw-contact-form label {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
}

#tw-contact-form input,
#tw-contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  border: 1px solid var(--tw-border);
  border-radius: 6px;
  font-size: 14px;
}

#tw-contact-form input::placeholder, #tw-contact-form textarea::placeholder {
  color: transparent;
}

#tw-contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

#tw-contact-forminput,
#tw-contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
}



/* ------------------------------------------------------------
   PRIMARY BUTTON (Send)
------------------------------------------------------------ */
#tw-contact-form button {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  background: var(--tw-btn-bg);
  color: var(--tw-btn-text);
  border: none;
  border-radius: var(--tw-btn-radius);
  cursor: pointer;
  font-size: 15px;
}


/* ------------------------------------------------------------
   SUCCESS STATE BUTTONS
------------------------------------------------------------ */
#tw-contact-close,
#tw-contact-continue {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border-radius: var(--tw-btn-radius);
  cursor: pointer;
  border: none;
}

/* Close = primary */
#tw-contact-close {
  background: var(--tw-btn-bg);
  color: var(--tw-btn-text);
}

/* Continue = secondary */
#tw-contact-continue {
  background: var(--tw-btn-bg-secondary);
  color: var(--tw-btn-text-secondary);
}


/* ------------------------------------------------------------
   SUCCESS PANEL
------------------------------------------------------------ */
#tw-contact-success {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 24px;
  box-sizing: border-box;
}


/* ------------------------------------------------------------
   UTILITY CLASSES
------------------------------------------------------------ */
.tw-hidden {
  display: none !important;
}

.tw-fill {
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0;
}

.tw-fill form {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tw-centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.tw-no-top-gap {
  padding-top: 0 !important;
}


/* ------------------------------------------------------------
   TOAST NOTIFICATIONS
------------------------------------------------------------ */
.tw-toast {
  font-family: sans-serif;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgb(255, 193, 193);
  color: rgb(107, 107, 107);
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 18px;
  max-width: 90%;
  text-align: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.tw-toast.show {
  opacity: 1;
}




/* ------------------------------------------------------------
   THEME: STYLE1 (Square, Underline, No Labels)
------------------------------------------------------------ */
.tw-modal-content.style1 {
  border-radius: 0;
  border: none;
  box-shadow: none;
}

.tw-modal-content.style1 h2{
  margin-top: 18px !important;
}

.tw-modal-content.style1 label {
  display: none !important;
}

.tw-modal-content.style1 input,
.tw-modal-content.style1 textarea {
  border: none !important;
  border-bottom: 1px solid var(--tw-border) !important;
  border-radius: 0 !important;
  /* background: transparent !important; */
  padding: 12px 0 !important;
  padding-left: 4px !important;
  margin-top: 16px !important;
}

.tw-modal-content.style1 input::placeholder, .tw-modal-content.style1 textarea::placeholder {
  color: gray !important;
}

.tw-modal-content.style1 input:read-only { 
  background-color: rgba(216, 216, 216, 0.616) !important; 
  color: rgb(82, 82, 82) !important;
}


.tw-modal-content.style1 input:focus,
.tw-modal-content.style1 textarea:focus {
  outline: none !important;
  border-bottom-color: var(--tw-btn-bg) !important;
}

.tw-modal-content.style1 button {
  border-radius: 0 !important;
  margin-top: 24px !important;
}


/* ------------------------------------------------------------
  Validation 
------------------------------------------------------------ */
.tw-modal-content input:user-invalid,
.tw-modal-content textarea:user-invalid {
  background: rgba(255, 0, 0, 0.199) !important;
  color: red;
}

.tw-modal-content input:required:user-valid,
.tw-modal-content textarea:required:user-valid {
  border-color: #2ecc71 !important;
}

.tw-modal-content input:required:user-valid {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232ecc71'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  padding-right: 35px !important;
}

.tw-modal-content textarea:required:user-valid {
  background-position: right 10px top 12px;
}
