/**
 * Theme Name: Child theme of TutorStarter
 * Template:   tutorstarter
 */

/* ==========================================================================
   Modern Terms & Conditions / Privacy Policy Modal
   ========================================================================== */

body.cv-modal-open {
  overflow: hidden !important;
}

.cv-modal-wrapper {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.cv-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000000;
}

.cv-modal-card {
  position: relative;
  z-index: 1000001;
  background: #ffffff;
  width: 100%;
  max-width: 660px;
  max-height: 85vh;
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  animation: cvModalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cvModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Modal Header */
.cv-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cv-modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.cv-modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cv-modal-close-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Modal Body */
.cv-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  color: #334155;
  font-size: 15px;
  line-height: 1.7;
}

.cv-modal-body h1,
.cv-modal-body h2,
.cv-modal-body h3,
.cv-modal-body h4 {
  color: #0f172a;
  font-weight: 800;
  margin-top: 1.5rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}

.cv-modal-body h1:first-child,
.cv-modal-body h2:first-child,
.cv-modal-body h3:first-child {
  margin-top: 0;
}

.cv-modal-body h2 {
  font-size: 1.75rem;
  line-height: 1.25;
}

.cv-modal-body h3 {
  font-size: 1.35rem;
}

.cv-modal-body p {
  margin-bottom: 1.15rem;
  color: #475569;
}

.cv-modal-body strong {
  color: #0f172a;
}

.cv-modal-body a {
  color: #4f46e5;
  text-decoration: underline;
}

/* Slim modern scrollbar for modal body */
.cv-modal-body::-webkit-scrollbar {
  width: 6px;
}

.cv-modal-body::-webkit-scrollbar-track {
  background: #f8fafc;
}

.cv-modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

.cv-modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Modal Footer */
.cv-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cv-modal-btn {
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  padding: 9px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.4;
  outline: none;
  box-sizing: border-box;
}

.cv-modal-btn-secondary {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.cv-modal-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

.cv-modal-btn-primary {
  background: #4f46e5;
  color: #ffffff;
  border: 1px solid #4f46e5;
}

.cv-modal-btn-primary:hover {
  background: #4338ca;
  border-color: #4338ca;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* ==========================================================================
   Password Fields & Custom Show/Hide Icons
   ========================================================================== */

/* 1. Disable browser native password show/hide & clear buttons (Edge, IE, Chrome) */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="text"]::-ms-reveal,
input[type="text"]::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 0 !important;
}

/* 2. Password Field Container Positioning */
.tutor-password-field,
.cv-password-field-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.tutor-password-field input,
.cv-password-field-wrap input {
  width: 100% !important;
  padding-right: 42px !important;
  box-sizing: border-box !important;
}

/* Ensure ample padding when both checkmark and eye can be present */
.cv-tutor-password-validation .cv-password-field-wrap input,
.cv-tutor-password-validation input {
  padding-right: 70px !important;
}

/* 3. Custom Code Show/Hide Eye Button */
.tutor-password-field .show-hide-btn,
.cv-password-field-wrap .show-hide-btn,
.show-hide-btn {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 22px !important;
  height: 22px !important;
  cursor: pointer !important;
  z-index: 10 !important;
  display: inline-block !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 19px 19px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") !important;
  opacity: 0.75;
  transition: opacity 0.15s ease, transform 0.15s ease !important;
}

.tutor-password-field .show-hide-btn:hover,
.cv-password-field-wrap .show-hide-btn:hover,
.show-hide-btn:hover {
  opacity: 1 !important;
}

/* Eye Slash (when password visible / text mode) */
.tutor-password-field .show-hide-btn.hide-btn,
.cv-password-field-wrap .show-hide-btn.hide-btn,
.show-hide-btn.hide-btn {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.88 9.88a3 3 0 1 0 4.24 4.24'/%3E%3Cpath d='M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68'/%3E%3Cpath d='M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61'/%3E%3Cline x1='2' x2='22' y1='2' y2='22'/%3E%3C/svg%3E") !important;
}

/* 4. Orientation & Alignment of Password Confirmation Validation Icon */
.cv-password-field-wrap .tutor-validation-icon,
.cv-tutor-password-validation .tutor-validation-icon,
.tutor-form-icon-reverse.tutor-validation-icon {
  position: absolute !important;
  right: 44px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 9 !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  display: none !important; /* Hidden by default until passwords match */
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 18px 18px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* Hide font glyph pseudo-element to eliminate 'î¨' character rendering glitch */
.cv-password-field-wrap .tutor-validation-icon:before,
.cv-tutor-password-validation .tutor-validation-icon:before,
.tutor-form-icon-reverse.tutor-validation-icon:before {
  content: "" !important;
  display: none !important;
}

/* Show checkmark ONLY when .is-valid is present (passwords non-empty and matched) */
.cv-password-field-wrap .tutor-validation-icon.is-valid,
.cv-tutor-password-validation .tutor-validation-icon.is-valid,
.tutor-form-icon-reverse.tutor-validation-icon.is-valid {
  display: inline-flex !important;
}

/* 5. Registration Form AJAX Feedback Styles */
.cv-registration-ajax-alert ul {
  margin: 0;
  padding-left: 18px;
}

.cv-registration-ajax-alert li {
  margin-bottom: 4px;
}

.cv-registration-ajax-alert li:last-child {
  margin-bottom: 0;
}

.cv-registration-ajax-success {
  background-color: #f0fdf4 !important;
  border: 1px solid #bbf7d0 !important;
  color: #166534 !important;
  padding: 12px 16px !important;
  border-radius: 6px !important;
}

.tutor-btn.is-loading {
  opacity: 0.75;
  cursor: not-allowed !important;
}

/* 6. Checkout Billing Address Styles */
.cv-billing-zip-col.cv-hidden {
  display: none !important;
}

/* When Nepal is selected, Phone field becomes 100% width to preserve the grid borders */
.cv-billing-phone-col.full-width {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

.cv-billing-phone-col.full-width input {
  width: 100% !important;
}





