/* GiC Bell Dropdown + Refined Study Settings v1
   Focused patch: notification bell + settings only.
   Does NOT touch cards, rating transitions, Recorder, or app.js. */

/* ============================================================
   1) NOTIFICATION BELL — belongs to the real header
   ============================================================ */
.gic-notify-host.gic-notify-header-anchor{
  position:relative !important;
  top:auto !important;
  right:auto !important;
  bottom:auto !important;
  left:auto !important;
  z-index:130 !important;
  display:inline-flex !important;
  flex:0 0 auto !important;
  margin:0 8px 0 auto !important;
  vertical-align:middle !important;
}

.gic-notify-host.gic-notify-header-anchor .gic-notify-bell{
  position:relative !important;
  width:54px !important;
  height:54px !important;
  border-radius:18px !important;
  background:rgba(255,255,255,.96) !important;
  color:#145f54 !important;
  border:1px solid rgba(20,73,65,.11) !important;
  box-shadow:0 9px 24px rgba(18,59,52,.10) !important;
}

/* The inbox is now a DROPDOWN under the bell, never a bottom sheet. */
.gic-notify-host.gic-notify-header-anchor .gic-notify-panel{
  position:absolute !important;
  top:calc(100% + 10px) !important;
  right:var(--gic-notify-panel-right, 0px) !important;
  left:auto !important;
  bottom:auto !important;

  width:min(370px, calc(100vw - 18px)) !important;
  max-height:min(64vh, 570px) !important;
  overflow:hidden !important;

  border:1px solid rgba(25,68,60,.13) !important;
  border-radius:22px !important;
  background:#fffdf9 !important;
  box-shadow:0 24px 64px rgba(20,56,50,.20) !important;

  transform-origin:top right;
  animation:gicNotifyDropIn .17s ease-out both;
}

.gic-notify-host.gic-notify-header-anchor .gic-notify-panel::before{
  content:"";
  position:absolute;
  top:-7px;
  right:24px;
  width:13px;
  height:13px;
  background:#fffdf9;
  border-left:1px solid rgba(25,68,60,.11);
  border-top:1px solid rgba(25,68,60,.11);
  transform:rotate(45deg);
  z-index:2;
}

@keyframes gicNotifyDropIn{
  from{opacity:0;transform:translateY(-7px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

.gic-notify-host.gic-notify-header-anchor .gic-notify-list{
  max-height:min(43vh, 390px) !important;
  overflow-y:auto !important;
  overscroll-behavior:contain;
}

/* Bell must disappear behind/open drawer rather than float over it. */
body.gic-mobile-menu-open .gic-notify-host,
body:has(#mobileNav:not([hidden])) .gic-notify-host{
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
}

@media(max-width:640px){
  .gic-notify-host.gic-notify-header-anchor{
    margin-left:auto !important;
    margin-right:7px !important;
  }

  .gic-notify-host.gic-notify-header-anchor .gic-notify-bell{
    width:54px !important;
    height:54px !important;
    border-radius:18px !important;
  }

  .gic-notify-host.gic-notify-header-anchor .gic-notify-panel{
    width:min(355px, calc(100vw - 16px)) !important;
    max-height:62vh !important;
    border-radius:21px !important;
  }
}

/* ============================================================
   2) STUDY SETTINGS — remove old oversized injected item
   ============================================================ */
.gic-study-settings-nav-item{
  display:none !important;
}

/* The new item is cloned from a real drawer row, so it naturally inherits
   exactly the same spacing/type/icon treatment as Dashboard/Learn/Account. */
[data-gic-study-settings-refined]{
  cursor:pointer !important;
}

/* ============================================================
   3) REFINED STUDY SETTINGS SHEET
   ============================================================ */
.gic-study-settings-refined-overlay{
  position:fixed;
  inset:0;
  z-index:14500;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:10px;
  background:rgba(16,38,33,.28);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}

.gic-study-settings-refined-overlay[hidden]{
  display:none !important;
}

.gic-study-settings-refined-sheet{
  width:min(620px,100%);
  max-height:min(84vh,760px);
  overflow:auto;
  border:1px solid rgba(25,68,60,.12);
  border-radius:28px;
  background:#fffdf8;
  box-shadow:0 28px 80px rgba(20,52,47,.23);
  color:#173f38;
}

.gic-study-settings-refined-head{
  position:sticky;
  top:0;
  z-index:4;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:20px 21px 16px;
  border-bottom:1px solid #e8eeea;
  background:rgba(255,253,248,.97);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.gic-study-settings-refined-kicker{
  color:#ad813b;
  font-size:9px;
  font-weight:950;
  letter-spacing:.14em;
}

.gic-study-settings-refined-head h2{
  margin:4px 0 0;
  font-size:23px;
  letter-spacing:-.03em;
  color:#173f38;
}

.gic-study-settings-refined-close{
  width:36px;
  height:36px;
  border:0;
  border-radius:12px;
  background:#edf3f0;
  color:#527168;
  font-size:22px;
  cursor:pointer;
}

.gic-study-settings-refined-body{
  padding:17px 20px 22px;
}

.gic-ss-section{
  padding:15px 0;
  border-bottom:1px solid #edf1ef;
}

.gic-ss-section:last-of-type{border-bottom:0}

.gic-ss-section h3{
  margin:0 0 5px;
  color:#264f47;
  font-size:13px;
}

.gic-ss-section p{
  margin:0 0 13px;
  color:#74847f;
  font-size:10px;
  line-height:1.5;
}

.gic-ss-presets{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}

.gic-ss-preset{
  min-height:54px;
  border:1px solid #dce7e2;
  border-radius:15px;
  background:#fafcfb;
  color:#667c75;
  font:inherit;
  font-size:10px;
  font-weight:900;
  cursor:pointer;
}

.gic-ss-preset.active{
  border-color:#b8d4ca;
  background:#edf7f3;
  color:#175d51;
  box-shadow:0 4px 13px rgba(22,83,73,.07);
}

.gic-ss-retention{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:13px;
}

.gic-ss-retention input[type="range"]{
  flex:1;
  accent-color:#17665a;
}

.gic-ss-retention-value{
  min-width:54px;
  padding:7px 9px;
  border-radius:11px;
  background:#eef5f2;
  color:#175c51;
  font-size:11px;
  font-weight:950;
  text-align:center;
}

.gic-ss-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.gic-ss-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.gic-ss-field label{
  color:#506a63;
  font-size:10px;
  font-weight:850;
}

.gic-ss-field select{
  min-height:44px;
  width:100%;
  padding:0 12px;
  border:1px solid #dce6e2;
  border-radius:13px;
  background:#fff;
  color:#244c44;
  font:inherit;
  font-size:11px;
  font-weight:800;
}

.gic-ss-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 13px;
  border:1px solid #e1e9e5;
  border-radius:14px;
  background:#fafcfb;
}

.gic-ss-toggle strong{
  display:block;
  color:#315a52;
  font-size:11px;
}

.gic-ss-toggle small{
  display:block;
  margin-top:3px;
  color:#84938f;
  font-size:9px;
}

.gic-ss-toggle input{
  width:19px;
  height:19px;
  accent-color:#17665a;
}

.gic-ss-note{
  margin-top:13px;
  padding:12px 13px;
  border-radius:14px;
  background:#f7f2e7;
  color:#76633e;
  font-size:9px;
  line-height:1.55;
}

.gic-ss-actions{
  display:flex;
  gap:9px;
  margin-top:18px;
}

.gic-ss-save,
.gic-ss-reset{
  min-height:46px;
  border-radius:14px;
  font:inherit;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

.gic-ss-save{
  flex:1;
  border:0;
  background:#146257;
  color:#fff;
  box-shadow:0 8px 20px rgba(20,98,87,.18);
}

.gic-ss-reset{
  padding:0 15px;
  border:1px solid #dce5e1;
  background:#fff;
  color:#71827d;
}

.gic-ss-status{
  min-height:18px;
  margin-top:8px;
  color:#357568;
  font-size:9px;
  font-weight:800;
  text-align:center;
}

@media(min-width:700px){
  .gic-study-settings-refined-overlay{
    align-items:center;
  }
}

@media(max-width:520px){
  .gic-ss-grid{
    grid-template-columns:1fr;
  }
}

/* GiC Study Settings compact accordion v2 */
.gic-study-settings-refined-head p{margin:6px 0 0;max-width:430px;color:#81908b;font-size:9px;line-height:1.45}
.gic-study-settings-refined-body{padding:12px 16px 18px!important}
.gic-ss-section{display:none!important}
.gic-ss-accordion{border:1px solid #e2e9e5;border-radius:17px;background:#fff;overflow:hidden;box-shadow:0 5px 16px rgba(22,60,52,.035)}
.gic-ss-accordion+.gic-ss-accordion{margin-top:8px}
.gic-ss-accordion>summary{list-style:none;display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:10px;padding:12px 13px;cursor:pointer;background:linear-gradient(180deg,#fff,#fafcfb)}
.gic-ss-accordion>summary::-webkit-details-marker{display:none}
.gic-ss-accordion>summary>span{display:flex;flex-direction:column;min-width:0}.gic-ss-accordion>summary strong{font-size:11px;color:#31564e}.gic-ss-accordion>summary small{margin-top:2px;color:#879690;font-size:7.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gic-ss-accordion>summary i{width:22px;height:22px;display:grid;place-items:center;color:#6f817b;font-style:normal;font-size:14px;font-weight:900;transition:transform .18s ease}.gic-ss-accordion[open]>summary i{transform:rotate(180deg)}
.gic-ss-accordion[open]>summary{border-bottom:1px solid #e8eeeb;background:#fdfefd}
.gic-ss-accordion-body{padding:12px 13px 13px}.gic-ss-accordion-body>p{margin:0 0 11px;color:#7d8c87;font-size:8.5px;line-height:1.5}
.gic-ss-readonly{min-height:44px;display:flex;align-items:center;padding:0 12px;border:1px solid #dce6e2;border-radius:13px;background:#f9fbfa;color:#335e55;font-size:10px;font-weight:900}
.gic-ss-actions{position:sticky;bottom:-18px;z-index:3;margin:12px -16px -18px!important;padding:12px 16px 14px;background:linear-gradient(180deg,rgba(255,253,248,.72),#fffdf8 34%);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.gic-ss-status{padding-top:8px;text-align:center}
@media(max-width:560px){.gic-study-settings-refined-sheet{max-height:86vh}.gic-ss-grid{grid-template-columns:1fr!important}.gic-ss-presets{gap:6px}.gic-ss-preset{min-height:50px}.gic-study-settings-refined-head{padding:18px 18px 14px}.gic-study-settings-refined-body{padding-left:12px!important;padding-right:12px!important}.gic-ss-actions{margin-left:-12px!important;margin-right:-12px!important;padding-left:12px!important;padding-right:12px!important}}
