/* CARIPVCARD V35 · perfil público: contraste, compartir y multimedia */

/* =========================================================
   1) PERFIL PÚBLICO CLARO · CONTRASTE REAL
   ========================================================= */
html:not([data-profile-theme="dark"]) body.public-profile,
html[data-profile-theme="light"] body.public-profile{
  color:#111827!important;
}
html:not([data-profile-theme="dark"]) .public-profile .profile-card-public,
html[data-profile-theme="light"] .public-profile .profile-card-public{
  color:#111827!important;
}
html:not([data-profile-theme="dark"]) .public-profile .profile-heading h1,
html[data-profile-theme="light"] .public-profile .profile-heading h1,
html:not([data-profile-theme="dark"]) .public-profile .section-title span,
html[data-profile-theme="light"] .public-profile .section-title span,
html:not([data-profile-theme="dark"]) .public-profile .service-list strong,
html[data-profile-theme="light"] .public-profile .service-list strong,
html:not([data-profile-theme="dark"]) .public-profile .location-card strong,
html[data-profile-theme="light"] .public-profile .location-card strong,
html:not([data-profile-theme="dark"]) .public-profile .public-document-list strong,
html[data-profile-theme="light"] .public-profile .public-document-list strong,
html:not([data-profile-theme="dark"]) .public-profile .public-media-item figcaption,
html[data-profile-theme="light"] .public-profile .public-media-item figcaption{
  color:#111827!important;
  opacity:1!important;
}
html:not([data-profile-theme="dark"]) .public-profile .profile-heading p,
html[data-profile-theme="light"] .public-profile .profile-heading p{
  color:color-mix(in srgb,var(--profile-primary) 72%,#111827)!important;
  opacity:1!important;
}
html:not([data-profile-theme="dark"]) .public-profile .profile-heading span,
html[data-profile-theme="light"] .public-profile .profile-heading span,
html:not([data-profile-theme="dark"]) .public-profile .profile-bio,
html[data-profile-theme="light"] .public-profile .profile-bio,
html:not([data-profile-theme="dark"]) .public-profile .section-title small,
html[data-profile-theme="light"] .public-profile .section-title small,
html:not([data-profile-theme="dark"]) .public-profile .service-list p,
html[data-profile-theme="light"] .public-profile .service-list p,
html:not([data-profile-theme="dark"]) .public-profile .location-card span,
html[data-profile-theme="light"] .public-profile .location-card span,
html:not([data-profile-theme="dark"]) .public-profile .public-document-list small,
html[data-profile-theme="light"] .public-profile .public-document-list small{
  color:#4b5563!important;
  opacity:1!important;
}
html:not([data-profile-theme="dark"]) .public-profile .profile-quick-actions a,
html[data-profile-theme="light"] .public-profile .profile-quick-actions a,
html:not([data-profile-theme="dark"]) .public-profile .profile-quick-actions a span,
html[data-profile-theme="light"] .public-profile .profile-quick-actions a span,
html:not([data-profile-theme="dark"]) .public-profile .social-grid a,
html[data-profile-theme="light"] .public-profile .social-grid a,
html:not([data-profile-theme="dark"]) .public-profile .social-grid a span,
html[data-profile-theme="light"] .public-profile .social-grid a span{
  color:#273244!important;
  opacity:1!important;
}
html:not([data-profile-theme="dark"]) .public-profile .location-card,
html[data-profile-theme="light"] .public-profile .location-card,
html:not([data-profile-theme="dark"]) .public-profile .profile-quick-actions a,
html[data-profile-theme="light"] .public-profile .profile-quick-actions a,
html:not([data-profile-theme="dark"]) .public-profile .social-grid a,
html[data-profile-theme="light"] .public-profile .social-grid a,
html:not([data-profile-theme="dark"]) .public-profile .service-list article,
html[data-profile-theme="light"] .public-profile .service-list article,
html:not([data-profile-theme="dark"]) .public-profile .profile-service-link,
html[data-profile-theme="light"] .public-profile .profile-service-link{
  background:rgba(255,255,255,.93)!important;
  border-color:#e1e6ee!important;
}

/* =========================================================
   2) MODAL COMPARTIR · CONTRASTE Y ESPACIADO CONSISTENTES
   ========================================================= */
.public-share-modal{padding:18px!important}
.public-share-modal .share-card{
  width:min(520px,calc(100vw - 36px))!important;
  max-width:520px!important;
  max-height:calc(100dvh - 36px)!important;
  border-radius:28px!important;
  background:#fff!important;
  color:#111827!important;
  border:1px solid #e5e9f0!important;
  box-shadow:0 30px 90px rgba(15,23,42,.28)!important;
}
.public-share-modal .modal-head{
  padding:24px 26px 20px!important;
  border-bottom:1px solid #edf0f4!important;
}
.public-share-modal .modal-head small{color:#6d4aff!important;font-weight:900!important}
.public-share-modal .modal-head h3{color:#111827!important}
.public-share-modal .modal-head>button{
  background:#f4f6f9!important;
  border:1px solid #e5e9f0!important;
  color:#111827!important;
}
.public-share-modal .modal-head>button i{color:inherit!important}
.public-share-modal .share-preview{
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
  color:#111827!important;
  box-shadow:0 8px 24px rgba(15,23,42,.04)!important;
}
.public-share-modal .share-preview strong{color:#111827!important;font-weight:800!important;opacity:1!important}
.public-share-modal .share-preview span{color:#475569!important;opacity:1!important}
.public-share-modal .share-preview small{color:#64748b!important;opacity:1!important}
.public-share-modal .share-avatar{
  background:#fff!important;
  border:1px solid #dce3eb!important;
  box-shadow:0 6px 18px rgba(15,23,42,.07)!important;
}
.public-share-modal .share-avatar img{object-fit:contain!important;padding:3px!important}
.public-share-modal .share-options a{
  background:#fff!important;
  border:1px solid #dfe5ec!important;
  color:#334155!important;
  box-shadow:0 7px 20px rgba(15,23,42,.035)!important;
}
.public-share-modal .share-options a span{color:#334155!important;font-weight:800!important}
.public-share-modal .share-options a i{color:var(--profile-primary,#6d4aff)!important}
.public-share-modal .share-copy{background:#fff!important;border:1px solid #dce3eb!important}
.public-share-modal .share-copy input{background:#f8fafc!important;color:#1f2937!important;-webkit-text-fill-color:#1f2937!important}
.public-share-modal .share-copy button{background:#fff!important;color:#6248df!important;border-left:1px solid #dce3eb!important}
.public-share-modal .native-share-button{color:#fff!important}

html[data-profile-theme="dark"] .public-share-modal .share-card{
  background:#101721!important;
  color:#f8fafc!important;
  border-color:#2a3545!important;
}
html[data-profile-theme="dark"] .public-share-modal .modal-head{border-bottom-color:#2a3545!important}
html[data-profile-theme="dark"] .public-share-modal .modal-head small{color:#b7a8ff!important}
html[data-profile-theme="dark"] .public-share-modal .modal-head h3{color:#f8fafc!important}
html[data-profile-theme="dark"] .public-share-modal .modal-head>button{background:#192231!important;border-color:#334155!important;color:#f8fafc!important}
html[data-profile-theme="dark"] .public-share-modal .share-preview{
  background:#17202c!important;
  border-color:#334155!important;
  color:#f8fafc!important;
}
html[data-profile-theme="dark"] .public-share-modal .share-preview strong{color:#f8fafc!important}
html[data-profile-theme="dark"] .public-share-modal .share-preview span{color:#cbd5e1!important}
html[data-profile-theme="dark"] .public-share-modal .share-preview small{color:#94a3b8!important}
html[data-profile-theme="dark"] .public-share-modal .share-options a{background:#17202c!important;border-color:#334155!important;color:#e2e8f0!important}
html[data-profile-theme="dark"] .public-share-modal .share-options a span{color:#e2e8f0!important}
html[data-profile-theme="dark"] .public-share-modal .share-copy{background:#0c121b!important;border-color:#334155!important}
html[data-profile-theme="dark"] .public-share-modal .share-copy input{background:#0c121b!important;color:#e5e7eb!important;-webkit-text-fill-color:#e5e7eb!important}
html[data-profile-theme="dark"] .public-share-modal .share-copy button{background:#17202c!important;color:#c4b5fd!important;border-left-color:#334155!important}

/* =========================================================
   3) MULTIMEDIA · UN ELEMENTO PROTAGONISTA POR VEZ
   ========================================================= */
.public-profile .media-carousel-shell{position:relative;margin-top:13px}
.public-profile .media-carousel-head{
  position:absolute!important;
  inset:50% 0 auto!important;
  transform:translateY(-50%)!important;
  display:flex!important;
  justify-content:space-between!important;
  pointer-events:none!important;
  margin:0!important;
  z-index:5!important;
}
.public-profile .media-carousel-head button{
  pointer-events:auto!important;
  width:44px!important;
  height:44px!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.96)!important;
  border:1px solid #e1e6ed!important;
  color:#1f2937!important;
  box-shadow:0 12px 30px rgba(15,23,42,.14)!important;
  backdrop-filter:blur(10px);
}
.public-profile .media-carousel-head [data-media-prev]{margin-left:10px}
.public-profile .media-carousel-head [data-media-next]{margin-right:10px}
.public-profile .public-media-carousel{
  display:flex!important;
  gap:16px!important;
  overflow-x:auto!important;
  scroll-snap-type:x mandatory!important;
  scroll-behavior:smooth!important;
  scrollbar-width:none!important;
  padding:0!important;
  overscroll-behavior-inline:contain;
}
.public-profile .public-media-carousel::-webkit-scrollbar{display:none!important}
.public-profile .public-media-carousel .public-media-item{
  flex:0 0 100%!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  scroll-snap-align:start!important;
  scroll-snap-stop:always!important;
  margin:0!important;
  border:1px solid #e3e8ef!important;
  border-radius:20px!important;
  overflow:hidden!important;
  background:#fff!important;
  position:relative!important;
  box-shadow:0 10px 30px rgba(15,23,42,.055)!important;
}
.public-profile .public-media-stage{
  position:relative;
  width:100%;
  aspect-ratio:16/10;
  overflow:hidden;
  background:#0b0f16;
  display:grid;
  place-items:center;
}
.public-profile .public-media-stage>img,
.public-profile .public-media-stage>video{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:cover!important;
  max-height:none!important;
}
.public-profile .public-media-stage>.video-ratio{position:absolute!important;inset:0!important;padding:0!important;width:100%!important;height:100%!important;border-radius:0!important}
.public-profile .public-media-stage>.video-ratio iframe{width:100%!important;height:100%!important;pointer-events:none!important}
.public-profile .media-open-button{
  position:absolute;
  inset:0;
  border:0;
  background:linear-gradient(180deg,transparent 55%,rgba(3,7,18,.26));
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:zoom-in;
  z-index:3;
}
.public-profile .media-open-button .media-open-icon{
  width:54px;height:54px;border-radius:18px;
  display:grid;place-items:center;
  background:rgba(15,23,42,.68);
  border:1px solid rgba(255,255,255,.28);
  backdrop-filter:blur(12px);
  box-shadow:0 12px 30px rgba(0,0,0,.2);
  font-size:18px;
  opacity:0;
  transform:scale(.92);
  transition:.2s ease;
}
.public-profile .public-media-item.video .media-open-button .media-open-icon,
.public-profile .public-media-item.embed .media-open-button .media-open-icon{opacity:1;transform:none}
.public-profile .public-media-item:hover .media-open-button .media-open-icon{opacity:1;transform:none}
.public-profile .public-media-item figcaption{
  padding:12px 14px!important;
  font-size:11px!important;
  line-height:1.45!important;
  color:#111827!important;
  background:#fff!important;
}
.public-profile .media-carousel-dots{display:flex;justify-content:center;gap:6px;margin-top:12px}
.public-profile .media-carousel-dots i{display:block;width:7px;height:7px;border-radius:999px;background:#d6dce5;transition:.2s}
.public-profile .media-carousel-dots i.active{width:22px;background:var(--profile-primary)}
html[data-profile-theme="dark"] .public-profile .public-media-carousel .public-media-item{background:#151d29!important;border-color:#2d394a!important}
html[data-profile-theme="dark"] .public-profile .public-media-item figcaption{background:#151d29!important;color:#f8fafc!important}
html[data-profile-theme="dark"] .public-profile .media-carousel-head button{background:rgba(22,30,42,.96)!important;border-color:#344155!important;color:#f8fafc!important}
html[data-profile-theme="dark"] .public-profile .media-carousel-dots i{background:#3b4657}
html[data-profile-theme="dark"] .public-profile .media-carousel-dots i.active{background:color-mix(in srgb,var(--profile-primary) 74%,#fff)}

/* =========================================================
   4) LIGHTBOX / VISOR DE MULTIMEDIA
   ========================================================= */
.media-lightbox{z-index:140!important;padding:16px!important;background:rgba(3,7,18,.88)!important;backdrop-filter:blur(16px)!important}
.media-lightbox .media-lightbox-card{
  width:min(1120px,calc(100vw - 32px))!important;
  max-width:1120px!important;
  height:min(820px,calc(100dvh - 32px));
  max-height:calc(100dvh - 32px)!important;
  border-radius:24px!important;
  background:#0b111a!important;
  border:1px solid rgba(255,255,255,.14)!important;
  overflow:hidden!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  box-shadow:0 35px 100px rgba(0,0,0,.55)!important;
}
.media-lightbox .media-lightbox-head{height:64px;padding:0 18px 0 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(255,255,255,.1);gap:16px}
.media-lightbox .media-lightbox-title{min-width:0;color:#fff;font-size:14px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.media-lightbox .media-lightbox-tools{display:flex;gap:8px;flex:0 0 auto}
.media-lightbox .media-lightbox-tools button{width:40px;height:40px;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.07);color:#fff;display:grid;place-items:center}
.media-lightbox .media-lightbox-tools button:hover{background:rgba(255,255,255,.13)}
.media-lightbox .media-lightbox-body{position:relative;min-height:0;display:grid;place-items:center;overflow:hidden;padding:18px}
.media-lightbox .media-lightbox-content{width:100%;height:100%;min-height:0;display:grid;place-items:center;overflow:auto;overscroll-behavior:contain}
.media-lightbox .media-lightbox-content img{max-width:100%;max-height:100%;object-fit:contain;display:block;transform-origin:center center;transition:transform .16s ease;user-select:none;-webkit-user-drag:none}
.media-lightbox .media-lightbox-content video{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;background:#000;border-radius:14px}
.media-lightbox .media-lightbox-content iframe{width:100%;height:100%;border:0;border-radius:14px;background:#000}
.media-lightbox .media-lightbox-nav{position:absolute;inset:50% 12px auto;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;width:calc(100% - 24px);z-index:3}
.media-lightbox .media-lightbox-nav button{pointer-events:auto;width:46px;height:46px;border:1px solid rgba(255,255,255,.18);border-radius:15px;background:rgba(0,0,0,.42);color:#fff;display:grid;place-items:center;backdrop-filter:blur(8px)}
.media-lightbox .media-lightbox-nav button:disabled{opacity:.25;cursor:default}
.media-lightbox [data-media-zoom]{display:none}
.media-lightbox.is-image [data-media-zoom]{display:grid}

@media(max-width:600px){
  .public-profile .media-carousel-head button{width:42px!important;height:42px!important}
  .public-profile .public-media-stage{aspect-ratio:4/3}
  .public-profile .public-media-item figcaption{font-size:10.5px!important}
  .public-share-modal .share-preview{grid-template-columns:64px minmax(0,1fr)!important}
  .public-share-modal .share-avatar{width:64px!important;height:64px!important}
  .media-lightbox{padding:0!important}
  .media-lightbox .media-lightbox-card{width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important}
  .media-lightbox .media-lightbox-head{height:60px;padding:0 12px 0 16px}
  .media-lightbox .media-lightbox-body{padding:8px}
  .media-lightbox .media-lightbox-nav{inset:50% 7px auto;width:calc(100% - 14px)}
  .media-lightbox .media-lightbox-nav button{width:42px;height:42px;border-radius:14px}
}

/* Las imágenes se muestran completas en el carrusel; no se deforman ni recortan. */
.public-profile .public-media-item.image .public-media-stage{background:#f4f7fb!important}
.public-profile .public-media-item.image .public-media-stage>img{object-fit:contain!important}
.public-profile .public-media-item.video .public-media-stage>video{object-fit:contain!important}
html[data-profile-theme="dark"] .public-profile .public-media-item.image .public-media-stage{background:#0b1118!important}
