/* DIPAYUDA - Promo field in the subscription checkout + Promos & Vouchers page (/promos) */

/* ===== Promo code field (subscription checkout) ===== */
.sub-promo{background:#fff;border:1px solid var(--line,#e3ece9);border-radius:10px;padding:14px;margin-top:14px}
.sub-promo-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.sub-promo-head h3{margin:0;font-size:14px;color:var(--ink,#173b4f)}
.sub-promo-head a{font-size:12px;font-weight:700;color:var(--green,#087760);white-space:nowrap}
.sub-promo-head a:hover{text-decoration:underline}
.sub-promo-row{display:flex;gap:8px;align-items:stretch}
.sub-promo-field{position:relative;flex:1;min-width:0}
.sub-promo-field svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:17px;height:17px;fill:none;stroke:#7a948c;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.sub-promo-field input{display:block;width:100%;height:42px;padding:0 12px 0 38px;border:1.5px solid #d3e1dd;border-radius:8px;background:var(--tint,#f4faf8);font:inherit;font-size:13px;font-weight:700;letter-spacing:.8px;text-transform:uppercase;color:var(--ink,#173b4f);outline:0;box-sizing:border-box;transition:border-color .15s,box-shadow .15s,background .15s}
.sub-promo-field input::placeholder{font-weight:500;letter-spacing:0;text-transform:none;color:#8aa09a}
.sub-promo-field input:hover{border-color:#b9d3cc}
.sub-promo-field input:focus{border-color:var(--green,#087760);background:#fff;box-shadow:0 0 0 3px rgba(8,119,96,.12)}
.sub-promo-row .btn{height:42px;padding:0 20px;flex:0 0 auto}
.sub-promo-row .btn:disabled{opacity:.6;cursor:wait}
.sub-promo .sub-msg{margin-top:10px}
.sub-promo .sub-msg:empty{display:none}
.sub-promo .sub-msg:not(:empty){padding:8px 11px;border-radius:8px;background:#f2f6f5;border:1px solid #e0e9e6;font-weight:600}
.sub-promo .sub-msg.ok{background:#ecf8f1;border-color:#c7e9d5;color:#15803d}
.sub-promo .sub-msg.bad{background:#fdecea;border-color:#f6cdc8;color:#9c2f24}
.sub-promo-pick{margin-top:12px}
.sub-promo-pick>small{display:block;font-size:11px;color:var(--muted,#6f8580);margin-bottom:6px}
.sub-promo-chips{display:flex;flex-wrap:wrap;gap:6px}
.sub-chip{display:inline-flex;align-items:center;gap:6px;border:1.5px dashed #9fcfc2;background:var(--tint,#f4faf8);color:var(--green,#087760);border-radius:8px;padding:5px 10px;font:inherit;font-size:11.5px;cursor:pointer;transition:.15s}
.sub-chip b{font-weight:800;letter-spacing:.6px}
.sub-chip span{color:#4b685f;font-weight:600}
.sub-chip:hover{background:var(--green,#087760);border-color:var(--green,#087760);color:#fff}
.sub-chip:hover span{color:#e7f6f1}

/* ===== Promos & Vouchers page ===== */
.ph-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ph-head :is(h1,h2){margin:0 0 4px;font-size:20px;color:var(--ink,#173b4f)}
.ph-head p{margin:0;font-size:12.5px;color:var(--muted,#6f8580)}
.ph-head-actions{display:flex;gap:8px;flex-wrap:wrap}
.ph-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}
.ph-stats>div{background:#fff;border:1px solid var(--line,#e3ece9);border-radius:9px;padding:10px 12px}
.ph-stats b{display:block;font-size:18px;color:var(--green,#087760)}
.ph-stats span{font-size:11.5px;color:var(--muted,#6f8580)}
.ph-tabs{display:flex;gap:6px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:none}
.ph-tabs::-webkit-scrollbar{display:none}
.ph-tabs button{flex:0 0 auto;border:1px solid #d8e5e1;background:#fff;color:#35574f;border-radius:999px;padding:7px 14px;font:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:.15s}
.ph-tabs button em{font-style:normal;font-weight:700;opacity:.7;margin-left:4px}
.ph-tabs button:hover{border-color:var(--green,#087760)}
.ph-tabs button.active{background:var(--green,#087760);border-color:var(--green,#087760);color:#fff}
.ph-section{margin:6px 0 22px}
.ph-section[hidden]{display:none}
.ph-section-head{display:flex;align-items:center;gap:10px;margin:0 0 10px}
.ph-section-head>div{flex:1 1 auto;min-width:0}
.ph-section-head>.ph-pill{margin-left:auto;flex:0 0 auto}
.ph-section-head h3{margin:0;font-size:14px;color:var(--ink,#173b4f)}
.ph-section-head p{margin:2px 0 0;font-size:11.5px;color:var(--muted,#6f8580)}
.ph-pill{font-size:10.5px;font-weight:800;border-radius:999px;padding:2px 9px;background:var(--tint,#f4faf8);color:var(--green,#087760);border:1px solid var(--tint-line,#e2eee9);white-space:nowrap}
.ph-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.ph-grid .coupon{flex:1 1 auto;min-height:104px}
.ph-grid .coupon-desc,.ph-grid .coupon-body h4{-webkit-line-clamp:2}
.ph-code{display:inline-flex;align-items:center;gap:6px;margin-top:4px;border:1.5px dashed #9fcfc2;background:var(--tint,#f4faf8);color:var(--green,#087760);border-radius:7px;padding:3px 9px;font:inherit;font-size:11.5px;font-weight:800;letter-spacing:.8px;cursor:pointer;align-self:flex-start;transition:.15s}
.ph-code svg{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ph-code:hover,.ph-code.is-copied{background:var(--green,#087760);border-color:var(--green,#087760);color:#fff}
.ph-use{display:inline-block;margin-top:5px;font-size:11px;font-weight:700;color:var(--green,#087760)}
.ph-use:hover{text-decoration:underline}
.ph-store{background:#fff;border:1px solid var(--line,#e3ece9);border-radius:10px;padding:12px;margin-bottom:12px}
.ph-store-top{display:flex;align-items:center;gap:10px;margin-bottom:10px;color:inherit}
.ph-store-top img{width:44px;height:44px;border-radius:9px;object-fit:cover;background:var(--tint,#f4faf8);flex:0 0 auto}
.ph-store-top div{min-width:0;flex:1}
.ph-store-top b{display:block;font-size:13px;color:var(--ink,#173b4f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ph-store-top small{display:block;font-size:11px;color:var(--muted,#6f8580);margin-top:1px}
.ph-store-top .btn{flex:0 0 auto;padding:6px 11px}
.ph-store .ph-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.ph-empty{background:#fff;border:1px dashed #cfe0da;border-radius:10px;padding:26px 16px;text-align:center;color:var(--muted,#6f8580);font-size:12.5px}
.ph-more{text-align:center;margin-top:6px}
@media(max-width:640px){
  .ph-stats{grid-template-columns:repeat(3,1fr);gap:6px}.ph-stats b{font-size:15px}
  .sub-promo-row{flex-wrap:wrap}.sub-promo-row .btn{flex:1 1 100%}
  .sub-chip{padding:3px 8px;font-size:10.5px;gap:4px}
  .ph-head-actions{width:100%}.ph-head-actions .btn{flex:1}

  /* 2-column vouchers: upright cards (discount ribbon on top, content below) */
  .ph-grid,.ph-store .ph-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .ph-store{padding:10px}
  .ph-grid .coupon{flex-direction:column;min-height:0;border-radius:10px;overflow:hidden}
  .ph-grid .coupon-stub{flex:0 0 auto;flex-direction:row;justify-content:flex-start;gap:6px;padding:7px 10px;border-radius:0;text-align:left}
  .ph-grid .coupon-stub small{font-size:8px;letter-spacing:.8px}
  .ph-grid .coupon-stub strong{font-size:16px}
  .ph-grid .coupon-stub strong.is-sm{font-size:13px}
  .ph-grid .coupon-stub strong.is-ico svg{width:16px;height:16px}
  .ph-grid .coupon-cut{flex:0 0 0;width:auto;height:0;margin:0 8px;border-left:0;border-top:1.5px dashed #cfe0da}
  .ph-grid .coupon-cut:before,.ph-grid .coupon-cut:after{display:none}
  .ph-grid .coupon-body{padding:7px 9px 9px;gap:3px;justify-content:flex-start}
  .ph-grid .coupon-body h4{font-size:11.5px;-webkit-line-clamp:2}
  .ph-grid .coupon-desc{font-size:10.5px;-webkit-line-clamp:2;line-height:1.3}
  .ph-grid .coupon-foot{gap:3px 4px;padding-top:2px}
  .ph-grid .coupon-chip{font-size:9px;padding:0 5px;line-height:15px}
  .ph-grid .coupon-date{font-size:9px;gap:2px}
  .ph-grid .coupon-date svg{width:9px;height:9px}
  .ph-code{font-size:9.5px;padding:2px 6px;gap:4px;letter-spacing:.5px;border-width:1px;margin-top:2px;max-width:100%}
  .ph-code svg{width:10px;height:10px}
  .ph-use{font-size:9.5px;margin-top:3px;line-height:1.3}
  .ph-store-top img{width:38px;height:38px}
}

/* Header toko: pakai logo bulat (bukan banner) */
.ph-store-top .ph-store-logo{width:44px;height:44px;border-radius:50%;object-fit:cover;border:2px solid #fff;box-shadow:0 0 0 1px var(--line,#e3ece9);background:var(--tint,#f4faf8);flex:0 0 auto}
.ph-store-top .ph-store-initial{display:grid;place-items:center;font-size:18px;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--green,#087760),var(--green-dark,#065f4c));border-color:#fff}
@media(max-width:800px){.ph-store-top .ph-store-logo{width:38px;height:38px}.ph-store-top .ph-store-initial{font-size:15px}}
