/* ============================================================
   mls/mlsdetail - GLOHO MODAL SYSTEM - Independiente de Bootstrap
   Archivo: gloho-modal.css
   ============================================================ */

   #detailShareBtn,
   .detail-share-trigger,
   .detail-nav-item--share {
       position: relative;
   }
   
   /* ----------------------------------------------------------
         BACKDROP
      ---------------------------------------------------------- */
   .gloho-modal-backdrop {
       display: none;
       position: fixed;
       inset: 0;
       background: rgba(0, 0, 0, 0.5);
       z-index: 1040;
       opacity: 0;
       transition: opacity 0.2s ease;
   }
   
   .gloho-modal-backdrop.show {
       display: block;
       opacity: 1;
   }
   
   /* ----------------------------------------------------------
          MODAL WRAPPER
       ---------------------------------------------------------- */
   .gloho-modal {
       display: none;
       position: fixed;
       inset: 0;
       z-index: 1050;
       overflow-x: hidden;
       overflow-y: auto;
       outline: 0;
       align-items: flex-start;
       justify-content: center;
       padding: 20px 0;
   }
   
   .gloho-modal.show {
       display: flex;
   }
   
   /* ----------------------------------------------------------
          DIALOG
       ---------------------------------------------------------- */
   .gloho-modal-dialog {
       position: relative;
       width: 100%;
       max-width: 520px;
       margin: 0 auto;
       pointer-events: none;
       transform: translateY(-20px);
       transition: transform 0.25s ease, opacity 0.25s ease;
       opacity: 0;
   }
   
   .gloho-modal.show .gloho-modal-dialog {
       transform: translateY(0);
       opacity: 1;
       pointer-events: auto;
   }
   
   /* ----------------------------------------------------------
          CONTENT
          .card en style_estudios: border-radius: 0; background: #f7f8fa;
          .card .form-control usa background: #ffffff
          Aquí el fondo del modal es blanco (card con form)
       ---------------------------------------------------------- */
   .gloho-modal-content {
       position: relative;
       background: #f7f8fa;
       border-radius: 0;
       overflow: hidden;
       box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
       border: none;
       display: flex;
       flex-direction: column;
       max-height: 80vh;
   }
   
   /* ----------------------------------------------------------
          CLOSE BUTTON
          Empareja con .btn-close en style_estudios.css
          font-size: 22px; color: #616161; border-radius: 50%;
       ---------------------------------------------------------- */
   .gloho-modal-close {
       position: absolute;
       top: 7px;
       right: 12px;
       z-index: 10;
       background: transparent;
       border: none;
       cursor: pointer;
       padding: 8px;
       line-height: 1;
       color: #616161;
       font-size: 22px;
       display: flex;
       align-items: center;
       justify-content: center;
       border-radius: 50%;
       transition: all 0.2s ease;
   }
   
   .gloho-modal-close:hover {
       color: #212121;
       background-color: rgba(0, 0, 0, 0.06);
   }
   
   
   /* ----------------------------------------------------------
         HEADER
         Título del modal con línea separadora inferior
      ---------------------------------------------------------- */
   .gloho-modal-header {
       padding: 16px 50px;
       background-color: #f7f8fa;
       border-bottom: 1px solid #e0e4eb;
       padding-right: 50px;
       /* espacio para el botón de cierre */
   }
   
   .gloho-modal-header .gloho-modal-title {
       font-size: 16px;
       font-weight: 500;
       color: rgba(0, 0, 0, 0.87);
       font-family: var(--primary-font, "Montserrat", sans-serif);
       margin: 0;
       letter-spacing: 1px;
       line-height: 1.3;
       text-align: center;
   }
   
   @media (max-width: 767px) {
       .gloho-modal-header {
           padding: 18px 15px 14px;
           padding-right: 44px;
       }
   }
   
   
   /* ----------------------------------------------------------
          BODY
          .card en style_estudios: padding: 20px 35px
          Agrego padding top extra para que no tape el botón de cierre
       ---------------------------------------------------------- */
   .gloho-modal-body {
       padding: 16px;
       background-color: #f7f8fa;
       overflow-y: auto;
       flex: 1;
   }
   
   /* ----------------------------------------------------------
          FORM LAYOUT
          Empareja con: form .form-group margin-bottom: 16px
          y el sistema de columnas col-6 que usabas (padding: 0 8px)
       ---------------------------------------------------------- */
   .gloho-modal-body .gloho-form-row {
       display: flex;
       flex-wrap: wrap;
       margin: 0 -8px;
   }
   
   .gloho-modal-body .gloho-form-group {
       padding: 0 8px;
       margin-bottom: 12px;
       box-sizing: border-box;
       text-align: left;
       border-radius: 0 !important;
   }
   
   .gloho-modal-body .gloho-form-group.half {
       width: 50%;
   }
   
   .gloho-modal-body .gloho-form-group.full {
       width: 100%;
   }
   
   /* ----------------------------------------------------------
          LABELS
          form label { font-size: 15px; font-weight: 400; margin-bottom: 2px; }
       ---------------------------------------------------------- */
   .gloho-modal-body label {
       display: block;
       font-size: 12px;
       font-weight: 400;
       line-height: 1.25;
       margin-bottom: 2px;
       text-align: left;
       color: rgba(0, 0, 0, 0.87);
       font-family: var(--primary-font, "Montserrat", sans-serif);
   }
   
   /* label.required:after { content: " *"; color: #f41b4e; } */
   .gloho-modal-body label.required::after {
       content: " *";
       color: #f41b4e;
       margin-right: 3px;
   }
   
   /* ----------------------------------------------------------
          INPUTS / TEXTAREA
          form .form-group input:
            background: #f7f8fa → en card usamos #ffffff
            border: solid 1px #fff
            height: 45px; padding: 5px 10px;
            font-size: 16px; font-weight: 400;
          Hover/focus: border: 1px solid #002349;
       ---------------------------------------------------------- */
   .gloho-modal-body .form-control {
       width: 100%;
       box-sizing: border-box;
       background-color: #ffffff;
       border: solid 1px #e0e4eb;
       /* visible en fondo blanco — mismo patrón de .card input */
       border-radius: 0;
       color: rgba(0, 0, 0, 0.87);
       font-size: 14px;
       font-weight: 400;
       padding: 8px 10px;
       font-family: var(--primary-font, "Montserrat", sans-serif);
       outline: none;
       transition: border-color 0.15s ease;
       box-shadow: none;
   }
   
   .gloho-modal-body .form-control,
   .gloho-modal-body .selectpicker-phone .bootstrap-select .dropdown-toggle,
   .gloho-modal-body .selectpicker-phone .bs-searchbox input {
       height: 40px !important;
   }
   
   .gloho-modal-body .form-control,
   .gloho-modal-body textarea.form-control {
       font-size: 14px;
       font-weight: 400;
   }
   
   .gloho-modal-body .form-control:is(:hover, :focus),
   .gloho-modal-body textarea.form-control:is(:hover, :focus) {
       border: 1px solid #002349;
       /* box-shadow: none; */
       webkit-box-shadow: 0px 0px 0px 2px rgb(3 3 3 / .5%) !important;
       box-shadow: 0px 0px 0px 2px rgb(3 3 3 / .5%) !important;
       color: rgba(0, 0, 0, 0.87);
       outline: none;
   }
   
   /* textarea */
   .gloho-modal-body textarea.form-control {
       height: auto !important;
       resize: vertical;
   }
   
   
   /* ----------------------------------------------------------
          VALIDACIÓN
          .form-control.is-invalid { border-color: #f41b4e; }
          .form-control.is-valid   { border-color: transparent; }
          .invalid-feedback        { color: #f41b4e; font-size: 12px; }
       ---------------------------------------------------------- */
   .gloho-modal .form-control.is-invalid,
   .gloho-modal .was-validated .form-control:invalid {
       background-image: none;
   }
   
   .gloho-modal-body .form-control.is-invalid {
       border-color: #f41b4e !important;
   }
   
   .gloho-modal-body .form-control.is-invalid:focus {
       border-color: #002349;
       box-shadow: none;
   }
   
   .gloho-modal-body .form-control.is-valid {
       border-color: transparent;
   }
   
   .gloho-modal-body .form-control.is-valid:focus {
       border-color: #002349;
       box-shadow: none;
   }
   
   .gloho-modal-body .invalid-feedback {
       color: #f41b4e;
       font-size: 10px;
       line-height: 125%;
       display: none;
       margin-top: 2px;
   }
   
   /* Mostrar feedback cuando el campo hermano tiene is-invalid */
   .gloho-modal-body .form-control.is-invalid+.invalid-feedback,
   .gloho-modal-body .form-control.is-invalid~.invalid-feedback {
       display: block;
   }
   
   /* ----------------------------------------------------------
          SELECTPICKER PHONE
          Empareja exactamente con:
          .selectpicker-gloho: display flex, position relative
          .selectpicker-phone .bootstrap-select.telefonosCodes: position absolute, width 100px
          .selectpicker-phone .telefonoNumber: margin-left 100px
          .selectpicker-phone .dropdown-toggle .countryName: display none
       ---------------------------------------------------------- */
   /* Borde rojo en el wrapper del teléfono cuando es inválido */
   .gloho-modal-body .selectpicker-phone.is-invalid {
       border: 1px solid #f41b4e !important;
       border-radius: 0;
   }
   
   /* Quitar borde rojo del input interno cuando el wrapper lo maneja */
   .gloho-modal-body .selectpicker-phone.is-invalid #shareTelefono,
   .gloho-modal-body .selectpicker-phone.is-invalid .bootstrap-select .dropdown-toggle {
       border: none !important;
       box-shadow: none !important;
   }
   
   .gloho-modal-body .selectpicker-phone.selectpicker-gloho {
       align-items: center;
       display: flex;
       font-weight: 400;
       position: relative;
   }
   
   .gloho-modal-body .selectpicker-phone .bootstrap-select.telefonosCodes {
       max-width: 85px !important;
       min-width: 85px !important;
       width: 85px !important;
       background-color: transparent !important;
       border: solid 0px transparent !important;
       position: absolute;
   }
   
   .gloho-modal-body .selectpicker-phone .bootstrap-select .dropdown-toggle {
       border-radius: 0 !important;
       border-top-right-radius: 0 !important;
       border-bottom-right-radius: 0 !important;
       max-width: 85px !important;
       min-width: 85px !important;
       width: 85px !important;
       top: 0;
       border-top: solid 1px #e0e4eb !important;
       border-bottom: solid 1px #e0e4eb !important;
       border-left: solid 1px #e0e4eb !important;
   }
   
   /* Oculta nombre del país, solo muestra bandera + código */
   .gloho-modal-body .selectpicker-phone .dropdown-toggle .countryName {
       display: none;
   }
   
   /* Input número: desplazado 85px para dejar espacio al selectpicker */
   .gloho-modal-body .selectpicker-phone .telefonoNumber {
       width: 85%;
       margin-left: 85px;
       padding-left: 4px !important;
       border-radius: 0 !important;
       z-index: 2;
       background-color: #ffffff;
       border-left: none;
       border-top: solid 1px #e0e4eb;
       border-bottom: solid 1px #e0e4eb;
       border-right: solid 1px #e0e4eb;
       box-shadow: none;
   }
   
   /* Dropdown lista de países */
   .gloho-modal-body .selectpicker-phone .bootstrap-select .dropdown-menu {
       background-color: #ffffff;
       border: solid 1px #e0e4eb;
       z-index: 2;
       border-radius: 0;
       max-height: 275px !important;
       top: 40px;
       width: 200px !important;
       min-width: 200px !important;
       box-shadow: none;
   }
   
   .gloho-modal-body .selectpicker-phone .bootstrap-select .dropdown-menu.inner {
       border: none;
       width: 100%;
   }
   
   .gloho-modal-body .selectpicker-gloho .telefonosCodes.bootstrap-select .dropdown-toggle,
   .gloho-modal-body .selectpicker-phone .bs-actionsbox,
   .gloho-modal-body .selectpicker-phone .bs-donebutton,
   .gloho-modal-body .selectpicker-phone .bs-searchbox {
       max-width: 100% !important;
       min-width: 100% !important;
       width: 100% !important;
       height: inherit !important;
       margin: 0;
   }
   
   .gloho-modal-body .selectpicker-phone .bs-searchbox,
   .gloho-modal-body .selectpicker-phone .bs-searchbox input {
       border-top: none;
       border-left: none;
       border-right: none;
       border-bottom: solid 1px #e0e4eb;
   }
   
   /* Feedback del teléfono */
   .gloho-modal-body #shareAlertTelefono {
       display: none;
   }
   
   .gloho-modal-body .telefonoNumber.is-invalid~#shareAlertTelefono {
       display: block;
   }
   
   .gloho-modal-body .dropdown .dropdown-toggle:after,
   .gloho-modal-body .bootstrap-select .dropdown-toggle .caret {
       background: url(https://gloho.com/cdn/utilidades/arrow-down.svg) no-repeat center;
       background-size: contain;
       border: 0;
       height: 14px;
       width: 14px;
       vertical-align: middle;
       margin-top: 1px;
       display: inline-block;
       transition: transform 0.2s ease;
   }
   
   .gloho-modal-body .bootstrap-select .dropdown-toggle .caret {
       top: 30%;
       right: 2px;
   }
   
   .gloho-modal-body .dropdown.show .dropdown-toggle:after,
   .gloho-modal-body .bootstrap-select.open .dropdown-toggle .caret {
       transform: rotate(180deg);
   }
   
   .gloho-modal-body .selectpicker-gloho .bootstrap-select .dropdown-toggle,
   .gloho-modal-body .selectpicker-gloho .bootstrap-select .dropdown-menu li a {
       padding: 0 6px;
   }
   
   /* ----------------------------------------------------------
          CHECKBOX WRAPPER
          Empareja exactamente con .checkbox-wrapper de style_estudios.css (línea 5443)
          gap: 16px; checkbox: 22x22px; border: 1px #e0e4eb; border-radius: 3px;
          checked: background #002349; icono SVG
          label: font-size: 10px; text-align: justify; line-height: 165%;
       ---------------------------------------------------------- */
   .gloho-modal-body .checkbox-wrapper {
       display: flex;
       align-items: flex-start;
       gap: 8px;
   }
   
   .gloho-modal-body .checkbox-wrapper input[type="checkbox"] {
       appearance: none;
       -webkit-appearance: none;
       width: 22px;
       min-width: 22px;
       height: 22px;
       border: 1px solid #e0e4eb;
       background-color: #fff;
       border-radius: 3px;
       cursor: pointer;
       position: relative;
       margin-top: 0;
       display: flex;
       justify-content: center;
       align-items: center;
       flex-shrink: 0;
   }
   
   .gloho-modal-body .checkbox-wrapper input[type="checkbox"]:checked {
       background-color: #002349 !important;
       border-color: #002349;
   }
   
   .gloho-modal-body .checkbox-wrapper input[type="checkbox"]:checked::after {
       content: "";
       position: absolute;
       width: 16px;
       height: 16px;
       background-image: url(https://gloho.com/cdn/utilidades/icon-check.svg);
       background-size: contain;
       background-repeat: no-repeat;
   }
   
   /* Estado inválido — empareja con .checkbox-wrapper input.is-invalid + shake */
   .gloho-modal-body .checkbox-wrapper input[type="checkbox"].is-invalid {
       border: 1px solid #f41b4e !important;
       animation: gloho-shake 0.3s ease;
   }
   
   
   @keyframes gloho-shake {
   
       0%,
       100% {
           transform: translateX(0);
       }
   
       25% {
           transform: translateX(-4px);
       }
   
       75% {
           transform: translateX(4px);
       }
   }
   
   /* Label del consent — empareja con .checkbox-wrapper label */
   .gloho-modal-body .checkbox-wrapper label {
       font-size: 8px;
       letter-spacing: 0;
       text-align: justify;
       line-height: 155%;
       font-weight: 400;
       margin-bottom: 0;
       cursor: pointer;
       color: rgba(0, 0, 0, 0.87);
   }
   
   .gloho-modal-body .checkbox-wrapper label a {
       color: #2B6ED2;
       text-decoration: underline !important;
   }
   
   /* Feedback de consent */
   .gloho-modal-body #shareConsentFeedback {
       color: #f41b4e;
       font-size: 10px;
       line-height: 125%;
       display: none;
       margin-top: 2px;
   }
   
   /* ----------------------------------------------------------
          BOTÓN SUBMIT
          Empareja con .btn_light_blue:
          background: #002349; border-radius: 32px; padding: 20px 16px;
          color: #fff; border: solid 1px #002349;
          Hover: background #fff; color #002349;
       ---------------------------------------------------------- */
   .gloho-modal-body .gloho-modal-submit {
       /* display: block;
          min-width: 200px;
          margin: 20px auto 8px;
          padding: 16px 8px;
          background: #002349;
          color: #ffffff;
          border: solid 1px #002349;
          border-radius: 32px;
          font-size: 14px;
          font-weight: 400;
          font-family: var(--primary-font, "Montserrat", sans-serif);
          cursor: pointer;
          box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
          transition: all 0.5s ease;
          letter-spacing: 1px; */
       display: none;
       /* oculto en body — el botón vive en el footer */
   }
   
   .gloho-modal-body .gloho-modal-submit:hover,
   .gloho-modal-body .gloho-modal-submit:focus {
       background: #ffffff !important;
       color: #002349 !important;
       border: solid 1px #002349 !important;
       box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
       outline: none;
   }
   
   /* ----------------------------------------------------------
          PLACEHOLDER
          Empareja con los ::-webkit-input-placeholder del sistema
          color: rgba(0,0,0,0.3); font-size: 16px;
       ---------------------------------------------------------- */
   .gloho-modal-body ::-webkit-input-placeholder,
   .gloho-modal-body ::-moz-placeholder,
   .gloho-modal-body :-ms-input-placeholder {
       color: rgba(0, 0, 0, 0.3) !important;
       font-size: 14px;
   }
   
   /* ----------------------------------------------------------
          FOCUS-VISIBLE — quita outline nativo (igual que el sistema)
       ---------------------------------------------------------- */
   .gloho-modal-body :focus-visible {
       outline: none;
   }
   
   .gloho-modal-body span.countrypicker-item span {
       font-size: 12px;
       letter-spacing: normal;
   }
     
   /* ----------------------------------------------------------
         PROPERTY PREVIEW en el modal de share
         Foto 100x100 izq + datos der
      ---------------------------------------------------------- */
   .gloho-share-property {
       display: flex;
       align-items: flex-start;
       gap: 14px;
       padding: 0 0 16px 0;
       margin-bottom: 16px;
       border-bottom: 1px solid #e0e4eb;
   }
   
   .gloho-share-property-img {
       flex-shrink: 0;
       width: 80px;
       height: 80px;
       overflow: hidden;
       border-radius: 6px;
       background-color: #e0e4eb;
   }
   
   .gloho-share-property-img img {
       width: 100%;
       height: 100%;
       object-fit: cover;
       display: block;
   }
   
   .gloho-share-property-info {
       flex: 1;
       min-width: 0;
       display: flex;
       flex-direction: column;
       gap: 3px;
       padding-top: 2px;
       line-height: normal;
   }
   
   .gloho-share-property-price {
       font-size: 18px;
       font-weight: 500;
       color: rgba(0, 0, 0, 0.87);
       font-family: var(--primary-font, "Montserrat", sans-serif);
       line-height: 1.2;
   }
   
   .gloho-share-property-features {
       font-size: 12px;
       font-weight: 400;
       color: rgba(0, 0, 0, 0.7);
       font-family: var(--primary-font, "Montserrat", sans-serif);
   }
   
   .gloho-share-property-address {
       font-size: 12px;
       font-weight: 300;
       color: rgba(0, 0, 0, 0.55);
       font-family: var(--primary-font, "Montserrat", sans-serif);
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
   }
   
   /* ----------------------------------------------------------
          FOOTER — botón fijo en la parte inferior del modal
       ---------------------------------------------------------- */
   .gloho-modal-footer {
       padding: 16px;
       background-color: #f7f8fa;
       border-top: 1px solid #e0e4eb;
       flex-shrink: 0;
   }
   
   .gloho-modal-footer .gloho-modal-submit {
       display: block;
       min-width: 200px;
       margin: 0 auto;
       padding: 8px;
       background: #002349;
       color: #ffffff;
       border: solid 1px #002349;
       border-radius: 32px;
       font-size: 14px;
       font-weight: 400;
       font-family: var(--primary-font, "Montserrat", sans-serif);
       cursor: pointer;
       box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
       transition: all 0.5s ease;
       letter-spacing: 1px;
   }
   
   .gloho-modal-footer .gloho-modal-submit:hover,
   .gloho-modal-footer .gloho-modal-submit:focus {
       background: #ffffff !important;
       color: #002349 !important;
       border: solid 1px #002349 !important;
       box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
       outline: none;
   }
   
   /* ----------------------------------------------------------
          RESPONSIVE
          En mobile: half → full (igual que system a 767px)
          padding lateral ajustado como el sistema
       ---------------------------------------------------------- */
   @media (max-width: 767px) {
       .gloho-modal {
           padding: 0 0 40px;
   
       }
   
       .gloho-modal-dialog {
           max-width: 100%;
           margin: 0 8px;
       }
   
       .gloho-modal-body {
           padding: 16px;
       }
   
       .gloho-modal-footer {
           padding: 12px 16px;
       }
   
       /* Half cols pasan a full en mobile */
       .gloho-modal-body .gloho-form-group.half {
           width: 100%;
       }
   
       /* Conservar padding lateral de nombre/apellido como el sistema */
       .gloho-modal-body .gloho-form-group.half.nombreRepresentante {
           padding-right: 8px !important;
       }
   
       .gloho-modal-body .gloho-form-group.half.apellidoRepresentante {
           padding-left: 8px !important;
       }
   }