/*
  iMobile — iPad Price Calculator Styles
  /sell/ipad/ipad-calculator.css

  Scoped to the calculator iframe only.
  Brand colors use CSS variables so future store themes
  can override just the :root block without touching anything else.
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

/* ── Variables ── */
:root {
  --g:        #3a7d1e;
  --g2:       #2d6118;
  --gl:       #4a9a28;
  --gbg:      #f0fdf4;
  --gbdr:     #bbf7d0;
  --dark2:    #0d1520;
  --text:     #0f1923;
  --sub:      #374151;
  --muted:    #6b7280;
  --bdr:      #e2e8f0;
  --card:     #f8fafc;
  --white:    #fff;
  --amber:    #d97706;
  --amber-bg: #fffbeb;
  --amber-bdr:#fde68a;
  --blue:     #2563eb;
  --blue-bg:  #eff6ff;
  --blue-bdr: #bfdbfe;
  --font:     'Plus Jakarta Sans', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}

/* ── Shell ── */
.shell { width: 100%; background: var(--white); overflow: visible; }

@media (min-width: 601px) {
  body { padding: 1rem; }
  .shell {
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid var(--bdr);
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(0,0,0,.07);
  }
}

/* ── Header ── */
.hdr       { background: var(--dark2); padding: .8rem 1.25rem .65rem; }
.hdr-title { font-size: .98rem; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: .1rem; }
.hdr-sub   { font-size: .68rem; color: #475569; margin-bottom: .3rem; }
.hdr-trust { display: flex; gap: .5rem .85rem; flex-wrap: wrap; }
.hdr-trust span { font-size: .64rem; font-weight: 600; color: #475569; }

/* ── Progress bar ── */
.prog      { height: 3px; background: #1e293b; }
.prog-fill { height: 100%; background: var(--g); transition: width .4s ease; }

/* ── Step header ── */
.sthdr   { padding: .8rem 1.25rem .55rem; border-bottom: 1px solid var(--bdr); display: flex; align-items: center; gap: .6rem; }
.stnum   { width: 23px; height: 23px; border-radius: 50%; background: var(--g); color: #fff; font-size: .66rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sttitle { font-size: .9rem; font-weight: 800; color: var(--text); }
.stsub   { font-size: .68rem; color: var(--muted); margin-top: 1px; }

/* ── Body ── */
.body { padding: 1rem 1.25rem; }

/* ── Screen transitions ── */
.screens { overflow: visible; position: relative; }
.screen  { display: none; }
.screen.active { display: block; }
.screen.slide-in-right { animation: slideInRight .28s cubic-bezier(.4,0,.2,1) both; }
.screen.slide-in-left  { animation: slideInLeft  .28s cubic-bezier(.4,0,.2,1) both; }

@keyframes slideInRight { from { opacity: 0; transform: translateX( 40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft  { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }

/* ── Step 1: Model grid ── */
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.model-btn {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  padding: .7rem .35rem .6rem;
  border: 1.5px solid var(--bdr); border-radius: 12px;
  background: var(--white); cursor: pointer;
  transition: all .15s; -webkit-tap-highlight-color: transparent;
  font-family: var(--font); width: 100%;
}
.model-btn:active                { transform: scale(.95); }
.model-btn:hover, .model-btn.sel { border-color: var(--g); background: var(--gbg); box-shadow: 0 0 0 1px var(--g); }
.model-img  { width: 100%; height: 72px; object-fit: contain; object-position: bottom; }
.model-name { font-size: .62rem; font-weight: 700; color: var(--text); text-align: center; line-height: 1.25; }

/* ── Step 2: Connectivity ── */
.conn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.conn-btn {
  padding: 1.1rem .75rem;
  border: 1.5px solid var(--bdr); border-radius: 12px;
  background: var(--white); cursor: pointer; text-align: center;
  transition: all .15s; -webkit-tap-highlight-color: transparent;
  font-family: var(--font);
}
.conn-btn:active                { transform: scale(.97); }
.conn-btn:hover, .conn-btn.sel  { border-color: var(--g); background: var(--gbg); box-shadow: 0 0 0 1px var(--g); }
.conn-icon  { font-size: 1.6rem; display: block; margin-bottom: .35rem; }
.conn-label { font-size: .88rem; font-weight: 800; color: var(--text); display: block; margin-bottom: 2px; }
.conn-sub   { font-size: .67rem; color: var(--muted); display: block; }

/* ── Step 3: Condition cards ── */
.cond-list { display: flex; flex-direction: column; gap: .55rem; }
.cond-card {
  display: flex; align-items: flex-start; gap: .85rem;
  padding: .9rem 1rem;
  border: 1.5px solid var(--bdr); border-radius: 12px;
  background: var(--white); cursor: pointer;
  transition: all .15s; -webkit-tap-highlight-color: transparent;
}
.cond-card:active                { transform: scale(.99); }
.cond-card:hover, .cond-card.sel { border-color: var(--g);   background: var(--gbg);    box-shadow: 0 0 0 1px var(--g); }
.cond-card.new-sealed:hover,
.cond-card.new-sealed.sel        { border-color: var(--blue); background: var(--blue-bg); box-shadow: 0 0 0 1px var(--blue); }

.radio { width: 18px; height: 18px; border: 2px solid var(--bdr); border-radius: 50%; flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.cond-card.sel            .radio        { border-color: var(--g);    background: var(--g); }
.cond-card.sel            .radio::after { content: ''; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.cond-card.new-sealed.sel .radio        { border-color: var(--blue); background: var(--blue); }
.cond-card.new-sealed.sel .radio::after { content: ''; width: 6px; height: 6px; background: #fff; border-radius: 50%; }

.cond-title { font-size: .88rem; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.cond-grade { font-size: .63rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .3rem; }
.cg-new { color: var(--blue); }
.cg-a   { color: var(--g); }
.cg-b   { color: #0891b2; }
.cg-c   { color: var(--amber); }
.cond-desc { font-size: .77rem; color: var(--sub); line-height: 1.5; margin-bottom: .4rem; }
.req-list  { list-style: none; display: flex; flex-direction: column; gap: .2rem; margin-top: .3rem; }
.req-list li { font-size: .71rem; color: var(--sub); display: flex; gap: .35rem; align-items: flex-start; line-height: 1.4; }
.req-list li::before { content: '\2713'; color: var(--g); font-weight: 700; font-size: .68rem; flex-shrink: 0; margin-top: 1px; }

/* ── Step 4: Storage ── */
.storage-loading { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; padding: .4rem 0; }
.dp span { width: 4px; height: 4px; background: var(--g); border-radius: 50%; animation: dp 1.2s ease-in-out infinite; display: inline-block; }
.dp span:nth-child(2) { animation-delay: .2s; }
.dp span:nth-child(3) { animation-delay: .4s; }
@keyframes dp { 0%, 80%, 100% { opacity: .2; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

.pill-group { display: flex; flex-wrap: wrap; gap: .45rem; }
.pill {
  padding: .55rem 1.1rem; border-radius: 50px;
  border: 1.5px solid var(--bdr); background: var(--card);
  color: var(--sub); font-family: var(--font); font-size: .88rem; font-weight: 600;
  cursor: pointer; transition: all .15s; -webkit-tap-highlight-color: transparent;
  min-height: 40px;
}
.pill:active { transform: scale(.96); }
.pill:hover  { border-color: var(--g); color: var(--g); background: var(--gbg); }
.pill.sel    { border-color: var(--g); background: var(--g); color: #fff; box-shadow: 0 2px 8px rgba(58,125,30,.25); }

/* ── Step 5: Result ── */
.icloud-note  { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: .6rem .9rem; font-size: .72rem; color: #92400e; line-height: 1.5; margin-bottom: .65rem; }
.result-hero  { background: var(--dark2); border-radius: 14px; padding: 1.5rem; text-align: center; margin-bottom: .75rem; }
.result-config{ font-size: .64rem; color: #64748b; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .35rem; }
.result-label { font-size: .78rem; color: #94a3b8; margin-bottom: .25rem; }
.result-price { font-size: 3.8rem; font-weight: 300; color: #fff; letter-spacing: -.06em; line-height: 1; margin-bottom: .2rem; font-family: var(--font); }
.result-price.na { font-size: 1.4rem; color: var(--muted); }
.result-note  { font-size: .7rem; color: #475569; }

.grade-label  { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .5rem; }
.price-cards  { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .75rem; }
.price-card   { display: flex; align-items: center; justify-content: space-between; padding: .75rem .9rem; border: 1.5px solid var(--bdr); border-radius: 10px; background: var(--card); gap: .5rem; cursor: pointer; transition: all .15s; }
.price-card:hover  { border-color: var(--g); background: var(--gbg); }
.price-card.active { border-color: var(--g); background: var(--gbg); box-shadow: 0 0 0 1px var(--g); }
.pc-name  { font-size: .84rem; font-weight: 700; color: var(--text); }
.pc-desc  { font-size: .66rem; color: var(--muted); margin-top: 1px; }
.pc-price { font-size: 1.4rem; font-weight: 900; color: var(--g); letter-spacing: -.03em; flex-shrink: 0; }

/* ── Email / lock offer ── */
.lock-offer        { background: var(--gbg); border: 1px solid var(--gbdr); border-radius: 10px; padding: .9rem 1rem; margin-bottom: .65rem; }
.lock-offer-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .2rem; }
.lock-title        { font-size: .8rem; font-weight: 800; color: var(--text); }
.lock-validity     { font-size: .68rem; font-weight: 600; color: var(--g); }
.lock-sub-txt      { font-size: .7rem; color: var(--sub); margin-bottom: .55rem; }
.email-row         { display: flex; gap: .4rem; }
.email-input {
  flex: 1; padding: .56rem .8rem;
  border: 1.5px solid var(--gbdr); border-radius: 8px;
  font-family: var(--font); font-size: .82rem; color: var(--text);
  background: #fff; outline: none; min-height: 38px;
}
.email-input:focus        { border-color: var(--g); }
.email-input::placeholder { color: var(--muted); }
.email-send {
  padding: .56rem .95rem; border-radius: 8px;
  background: var(--g); color: #fff; border: none; cursor: pointer;
  font-family: var(--font); font-size: .78rem; font-weight: 700; min-height: 38px;
}
.email-sent { font-size: .77rem; color: var(--g); font-weight: 600; text-align: center; padding: .25rem 0; }

/* ── CTA & restart ── */
.cta-btn {
  width: 100%; padding: .9rem; border-radius: 10px;
  background: var(--g); color: #fff; border: none; cursor: pointer;
  font-family: var(--font); font-size: .95rem; font-weight: 800;
  box-shadow: 0 4px 16px rgba(58,125,30,.3); min-height: 50px;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  margin-bottom: .6rem; text-decoration: none; transition: background .15s;
}
.cta-btn:hover  { background: var(--g2); }
.restart        { text-align: center; font-size: .73rem; color: var(--muted); padding: .1rem 0; }
.restart button { background: none; border: none; color: var(--g); font-family: var(--font); font-size: .73rem; font-weight: 600; cursor: pointer; }

/* ── Back button ── */
.back-row { padding: .65rem 1.25rem .15rem; border-top: 1px solid var(--bdr); margin-top: .65rem; }
.back-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .5rem .85rem;
  border: 1.5px solid var(--bdr); border-radius: 8px;
  background: var(--white); color: var(--sub);
  font-family: var(--font); font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.back-btn:hover { border-color: var(--text); color: var(--text); }

/* ── Expandable grade cards ── */
.pc-top      { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pc-chevron  { width: 18px; height: 18px; flex-shrink: 0; transition: transform .25s; color: var(--muted); }
.price-card.expanded .pc-chevron { transform: rotate(180deg); }
.pc-details  { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.price-card.expanded .pc-details { max-height: 200px; }

/* ── Result sub-screens ── */
.r-sub { display: none; }
.r-sub.r-active { display: block; }
.r-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 4px; }
.r-dot  { width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; transition: all .25s; }
.r-dot.r-on { background: var(--g); width: 18px; border-radius: 4px; }
.r-cta {
  width: 100%; padding: .85rem; border-radius: 10px;
  background: var(--g); color: #fff; border: none; cursor: pointer;
  font-family: var(--font); font-size: .92rem; font-weight: 800;
  min-height: 48px; display: flex; align-items: center; justify-content: center;
  gap: .4rem; margin-bottom: .5rem; text-decoration: none; transition: background .15s;
}
.r-cta:hover { background: var(--g2); }
.r-cta-outline {
  width: 100%; padding: .8rem; border-radius: 10px;
  background: #fff; color: var(--text); border: 1.5px solid var(--bdr);
  cursor: pointer; font-family: var(--font); font-size: .85rem; font-weight: 700;
  min-height: 46px; display: flex; align-items: center; justify-content: center;
  gap: .4rem; margin-bottom: .5rem; text-decoration: none; transition: all .15s;
}
.r-cta-outline:hover { border-color: var(--g); color: var(--g); }
.r-success-badge  { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--g); margin-bottom: 12px; }
.r-success-circle { width: 20px; height: 20px; border-radius: 50%; background: var(--g); display: flex; align-items: center; justify-content: center; }
.r-divider { border: none; border-top: 1px solid var(--bdr); margin: 16px 0; }

/* ── Responsive ── */
@media (max-width: 420px) {
  .email-row { flex-direction: column; }
}
