/* profilemailstyle.css — styling for Verlify profile > mail */


/* =============== Email Finder (top widget) =============== */
.mail-finder{
  display:grid; gap:1.25rem;
  grid-template-columns:minmax(260px, 420px) 1fr;
  align-items:start;
  margin: 0 auto 28px;
  border-radius: 16px;
  background: var(--frost);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0,0,0,.07);
  padding: 14px;
}
@media (max-width: 920px){ .mail-finder{ grid-template-columns:1fr; } }

.finder-left{ padding: 12px; }
.finder-right{ border-left:1px solid var(--line); padding:12px; }
@media (max-width:920px){ .finder-right{ border-left:0; border-top:1px solid var(--line); } }

.finder-title{
  margin: 6px 0 2px; font-weight:900; letter-spacing:-.01em;
}
.finder-label{
  display:block; font-size:.8rem; font-weight:800; color:var(--muted);
  letter-spacing:.04em; text-transform:uppercase; margin:10px 0 6px;
}
.finder-input{
  width:100%; border:1px solid var(--line); background:#fff; color:var(--ink);
  border-radius:12px; padding:12px 14px; font-size:1rem; outline:none;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.finder-input:focus{
  border-color:var(--accent1); box-shadow:0 0 0 4px rgba(99,102,241,.15);
}
.finder-hits{ margin-top:8px; color:var(--muted); font-size:.92rem; }

/* Preview pane */
.preview{
  min-height:220px; border:1px dashed var(--line); border-radius:12px; background:#fff; padding:14px;
}
.preview-empty{ color:var(--muted); padding:.25rem .25rem .5rem; }

/* Pager */
.pager{ display:flex; flex-wrap:wrap; gap:.45rem; margin-top:10px; }
.pager button{
  appearance:none; border:1px solid var(--line); background:var(--chip); color:var(--ink);
  padding:.4rem .6rem; border-radius:.6rem; font-weight:700; font-size:.86rem; cursor:pointer;
  transition:transform .12s ease, background .2s ease;
}
.pager button:hover{ transform:translateY(-1px); background:#fff; }
.pager button[aria-current="true"]{
  background:linear-gradient(90deg, var(--accent1), var(--accent2));
  color:#fff; border-color:transparent;
}

/* =============== Email Threads (full width stack) =============== */
.emails{ display:block; }
.email-thread{
  margin: 18px 0;
  border:1px solid var(--line);
  border-radius: 16px;
  background:#fff;
  box-shadow:0 10px 24px rgba(0,0,0,.05);
  overflow:hidden;
}

/* Header ribbon (color band) */
.email-ribbon{
  height:6px;
  background:linear-gradient(90deg, var(--accent1), var(--accent2));
}

/* Head row */
.email-head{
  padding: 12px 16px;
  border-bottom:1px solid var(--line);
  display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; justify-content:space-between;
}
.subject{ margin:0; font-size:1.05rem; font-weight:900; letter-spacing:-.01em; }
.fromto{ font-size:.92rem; color:var(--muted); }

/* Keywords */
.kw-field {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
.kw-field > span:first-child {
  font-size: .85rem;
  color: var(--muted);
  font-weight: 700; /* Only the “Keywords:” label */
}
.kw-visible {
  font-weight: 400;
  color: var(--ink);
}   
      
.kw-field > span{ font-size:.85rem; color:var(--muted); font-weight:800; }
.kw-input{
  flex:1; min-width:240px; border:1px solid var(--line); border-radius:.6rem;
  padding:.5rem .6rem; font-size:.95rem; background:#fff;
}
.kw-input:focus{ outline:none; border-color:var(--accent1); box-shadow:0 0 0 3px rgba(99,102,241,.15); }

/* Body */
.email-body{ padding: 16px 18px; }
.email-body .hdr{ font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-size:.8rem; margin:8px 0 6px; }
.email-body .bubble{
  border:1px solid var(--line); background:#fff; border-radius:12px; padding:12px 14px; margin-bottom:10px;
}
        
      
/* When a thread is cloned into the preview pane, keep styles */
.preview .email-thread{ margin:0; box-shadow:none; border:1px solid var(--line); }
.preview .kw-input{ background:#fff; }

/* Small utility */
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.9em; }

/* === Email Card (Apple Mail–style) === */
.email-card {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
  overflow: hidden;
  margin: 2rem 0;
  border: 1px solid rgba(0,0,0,.05);
}

/* Gradient bar on top */
.email-card::before {
  content: "";
  display: block;
  height: 6px;
  transition: background 0.3s ease;
}

/* Gradient variations */
.email-card.ribbon-1::before { background: linear-gradient(90deg,#8b5cf6,#3b82f6); } /* purple-blue */
.email-card.ribbon-2::before { background: linear-gradient(90deg,#06b6d4,#22c55e); } /* teal-green */
.email-card.ribbon-3::before { background: linear-gradient(90deg,#f59e0b,#ef4444); } /* amber-red */
.email-card.ribbon-4::before { background: linear-gradient(90deg,#0ea5e9,#6366f1); } /* sky-indigo */
.email-card.ribbon-5::before { background: linear-gradient(90deg,#ec4899,#f43f5e); } /* pink-rose */
.email-card.ribbon-6::before { background: linear-gradient(90deg,#10b981,#059669); } /* emerald-green */
.email-card.ribbon-7::before { background: linear-gradient(90deg,#6366f1,#a855f7); } /* indigo-violet */
.email-card.ribbon-8::before { background: linear-gradient(90deg,#14b8a6,#3b82f6); } /* cyan-blue */
.email-card.ribbon-9::before { background: linear-gradient(90deg,#f97316,#f43f5e); } /* orange-rose */
.email-card.ribbon-10::before { background: linear-gradient(90deg,#0f172a,#334155); } /* deep-slate */      
      
      
/* Header area (From / To / Subject / Date) */
.email-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: #f9fafb;
  font-size: 0.9rem;
  color: #374151;
}
.email-header div { margin-bottom: .25rem; }
.email-header span.label {
  color: #6b7280;
  font-weight: 600;
  min-width: 70px;
  display: inline-block;
}

/* Message body */
.email-body {
  padding: 1.5rem;
  font-size: 1rem;
  color: #111827;
  line-height: 1.7;
}
.email-body p { margin-bottom: 1rem; }

/* CARD */
.email-card{
  --ink:#0f172a; --muted:#6b7280; --line:#e5e7eb; --bg:#fff;
  background:var(--bg);
  border:1px solid rgba(0,0,0,.06);
  border-radius:16px;
  box-shadow:0 8px 22px rgba(0,0,0,.06);
  overflow:hidden;
  margin:24px 0;
}

/* TOOLBAR (Apple Mail vibe) */
.email-toolbar{
  display:flex; gap:.35rem; padding:.5rem .6rem;
  border-bottom:1px solid var(--line);
  background:linear-gradient(#f9fafb,#f3f4f6);
}
.email-toolbar button{
  display:inline-grid; place-items:center;
  width:32px; height:28px; border-radius:8px;
  border:1px solid #e5e7eb; background:#fff; color:#334155;
  box-shadow:0 1px 0 rgba(255,255,255,.7) inset, 0 1px 2px rgba(0,0,0,.05);
  cursor:pointer;
}
.email-toolbar button:hover{ background:#f8fafc; }

/* HEADER */
.email-header{
  padding:14px 18px 10px 18px;
  border-bottom:1px solid var(--line);
  background:#fff;
}
.email-header .who{
  display:flex; align-items:center; gap:12px; margin-bottom:.4rem;
}
.email-header .avatar{
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg,#94a3b8,#cbd5e1);
  color:#111827; font-weight:800; display:grid; place-items:center;
  letter-spacing:.02em; font-size:.85rem;
  box-shadow:0 1px 2px rgba(0,0,0,.08) inset, 0 2px 10px rgba(0,0,0,.06);
}
.email-header .fromto .row{
  font-size:.9rem; color:var(--ink); line-height:1.35;
}
.email-header .label{
  color:var(--muted); font-weight:600; margin-right:.35rem;
}

/* SUBJECT (H3 but same look) */
.email-header .subject{
  margin:6px 0 2px 0;
  font-size:1.15rem; font-weight:800; letter-spacing:-.01em;
  color:var(--ink);
}

/* BODY */
.email-body{
  padding:16px 18px 14px 18px;
  color:var(--ink); line-height:1.7; font-size:1rem;
}
   
/* TAGS */
.email-tags{
  display:flex; flex-wrap:wrap; gap:.4rem; padding:12px 16px 16px 16px;
  border-top:1px solid var(--line); background:#fafafa;
}
.email-tags .tag{
  font-size:.8rem; font-weight:600; color:#334155;
  padding:.28rem .55rem; border-radius:999px;
  background:#e2e8f0; border:1px solid #cbd5e1;
}      
      
/* Quoted previous message (Apple Mail vibe) */
.email-body .quoted-mail{
  margin-top:14px;
  border-top:1px solid #e5e7eb;
  padding-top:10px;
}

.email-body .quoted-mail > summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  font-weight:700;
  color:#334155;
  font-size:.95rem;
  margin:0 0 .35rem 0;
}
.email-body .quoted-mail[open] > summary { color:#0f172a; }
.email-body .quoted-mail > summary::-webkit-details-marker{ display:none; }

/* small chevron */
.email-body .quoted-mail > summary::before{
  content:"▸";
  display:inline-block;
  margin-right:.4rem;
  transition:transform .2s ease;
  color:#64748b;
}
.email-body .quoted-mail[open] > summary::before{ transform:rotate(90deg); }

/* “On {date} … wrote:” line */
.email-body .quote-head{
  color:#475569;
  font-size:.9rem;
  margin:0 0 .4rem 0;
}

/* boxed quoted email */
.email-body .quote-box{
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-left:4px solid #60a5fa; /* Apple-like quote bar */
  border-radius:10px;
  padding:10px 12px;
}

.email-body .quote-meta{
  font-size:.9rem; color:#475569; margin-bottom:.2rem;
}
.email-body .quote-meta span{
  color:#6b7280; font-weight:600; margin-right:.35rem;
}

.email-body .quote-body {
  margin: 0;                 /* remove extra outer spacing */
    margin-top: 20px;    
  padding: 0;                /* no inner padding */
  color: #0f172a;
  line-height: 1.5;          /* standard email readability */
  text-indent: 0;            /* remove unwanted first-line indent */
}  

.email-body img:hover {
  transform: scale(1.05);
}
  
      
/* Lightbox sizing */
.ah-lightbox .inner{
  width: min(70vw, 1200px);   /* ≈70% page width */
  aspect-ratio: 16 / 9;       /* keep video shape */
  max-height: 80vh;           /* don’t exceed viewport */
}
.ah-lightbox iframe,
.ah-lightbox video{
  width: 100%;
  height: 100%;
  display: block;
}
     

/* Lightbox overlay for any media */
#media-lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  display: none;             /* set to flex when opened */
  justify-content: center; align-items: center;
  z-index: 9999;
}
/* Lightbox container size (big, 70% page width) */
#media-lightbox .lb-content{
  width: min(70vw, 1200px);
  aspect-ratio: 16 / 9;
  max-height: 80vh;
}

/* Make iframe/video/img fill the box */
#media-lightbox .lb-content > *{
  width: 100%;
  height: 100%;
  display: block;
}
}
#media-lightbox .lb-content img,
#media-lightbox .lb-content video,
#media-lightbox .lb-content iframe {
  max-width: 90vw; max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
  display: block;
  background: #000;
  cursor: zoom-out;
}
      
/* Small inline media preview (same footprint as your image) */
.mini-media{
  display:inline-block; width:20%; max-width:240px; aspect-ratio:16/9;
  border-radius:8px; background:#000 center/cover no-repeat;
  vertical-align:middle; margin-right:.75rem; cursor:zoom-in;
  position:relative; overflow:hidden; transition:transform .2s ease;
}
.mini-media:hover{ transform:scale(1.05); }

/* poster image via inline style or JS; fallback color shown above */
.mini-media::after{ /* play icon */
  content:"";
  position:absolute; inset:auto; left:50%; top:50%; transform:translate(-50%,-50%);
  width:42px; height:42px; border-radius:9999px; background:rgba(255,255,255,.9);
  box-shadow:0 6px 18px rgba(0,0,0,.25);
  -webkit-mask:
    conic-gradient(from 0deg, #000 0 0) 0 0/0 0 no-repeat,
    linear-gradient(#000 0 0) center/40% 40% no-repeat;
}
.mini-media::before{ /* triangle */
  content:"";
  position:absolute; left:50%; top:50%; transform:translate(-45%,-50%);
  width:0; height:0;
  border-left:11px solid #0f172a; border-top:7px solid transparent; border-bottom:7px solid transparent;
  pointer-events:none;
}
      
/* keep play-button overlay centered */
.mini-media::after {
  width:42px; height:42px;
  left:50%; top:50%; transform:translate(-50%,-50%);
}      
      
      

      
      
      
      
/* --- Inline media thumbnails (uniform by HEIGHT) --- */

.email-body .img{ margin:10px 0; border-radius:12px; overflow:hidden; }
.email-body img{ max-width:100%; height:auto; display:block; }
.email-body .video{
  position:relative; padding-top:56.25%; border-radius:12px; overflow:hidden; background:#000; margin:10px 0;
}
.email-body .video iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }

/* Attachments / inline media */
.email-body img,
.email-body video {
  max-width: 100%;
  border-radius: .5rem;
  margin: 1rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}          
      
.email-body img:hover,
.email-body .mini-video:hover,
.email-body .mini-yt:hover { transform: scale(1.05); }

/* Keep mini YouTube iframes nicely proportioned */
.email-body .mini-yt {
  aspect-ratio: 16 / 9;
  height: auto;              /* width controls size via 20% rule */
  border: 0;
}
   
/* --- Uniform inline thumbnail sizing --- */
.email-body img.thumb,
.email-body img,      
.email-body img.inline,
.email-body .mini-media,
.email-body .mini-yt {
  display:inline-block;
  height:120px;              /* fixed uniform height */
  width:auto;
  aspect-ratio:16/9;
  border-radius:8px;
  vertical-align:middle;
  object-fit:cover;
  cursor:zoom-in;
  transition:transform .2s ease;
  margin-right:.75rem;
}

/* optional hover lift */
.email-body img.thumb:hover,
.email-body .mini-media:hover,
.email-body .mini-yt:hover { transform:scale(1.05); }
      

      
      
      