/* TALKCHAT_R19C12R9R16R1_DESKTOP_GIFT_LIGHT_POLISH
   Desktop light-mode visual correction for the already centered r10/r10r1
   Hediye Gönder modal.
   - remove dark hard-coded selected-card / gift-art backgrounds in light mode
   - improve white/gray surface hierarchy and readability
   - align Hediye geçmişi button + icon precisely
   - leave desktop dark mode and all mobile r16 behavior untouched
*/

@media (min-width:768px){

  /* Covers both explicit data-theme="light" and the legacy/default light state
     where data-theme can be absent. */
  html:not([data-theme="dark"]) #featureLayer:has(> .profile-gift-popup){
    background:rgba(15,23,42,.48)!important;
    backdrop-filter:blur(1.5px)!important;
    -webkit-backdrop-filter:blur(1.5px)!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .social-popup.profile-popup.profile-gift-popup{
    background:#ffffff!important;
    color:#172033!important;
    border:1px solid #dce4ec!important;
    box-shadow:0 26px 70px rgba(15,23,42,.22)!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup > header{
    background:#ffffff!important;
    color:#172033!important;
    border-bottom:1px solid #e5ebf1!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup > header strong{
    color:#172033!important;
    font-weight:800!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup > header button{
    color:#718096!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup > header button:hover{
    background:#f3f6f9!important;
    color:#334155!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup > #profileGiftForm{
    background:#ffffff!important;
    color:#172033!important;
  }

  /* Recipient + balance */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-target{
    color:#7b8796!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-target b{
    color:#172033!important;
    font-weight:800!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-balance{
    background:#f8fafc!important;
    color:#475569!important;
    border-color:#dce4ec!important;
    box-shadow:0 1px 2px rgba(15,23,42,.03)!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-balance b{
    color:#172033!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-balance .material-symbols-outlined,
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-balance .lucide-icon{
    color:#64748b!important;
  }

  /* Category chips */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-catalog-tabs{
    background:#ffffff!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-catalog-tabs button{
    border-color:#aab7c5!important;
    background:#ffffff!important;
    color:#5f6c7b!important;
    box-shadow:none!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-catalog-tabs button:hover{
    border-color:#73a8cc!important;
    background:#f5faff!important;
    color:#236f9f!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-catalog-tabs button.active{
    border-color:#148dcc!important;
    background:#1288c7!important;
    color:#ffffff!important;
    box-shadow:0 2px 5px rgba(18,136,199,.16)!important;
  }

  /* Light catalog scrollbar */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full{
    scrollbar-color:#aab8c6 #f4f7fa!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full::-webkit-scrollbar-track{
    background:#f4f7fa!important;
    border-radius:999px!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full::-webkit-scrollbar-thumb{
    background:#aab8c6!important;
    border-radius:999px!important;
    border:2px solid #f4f7fa!important;
  }

  /* Gift cards: remove the dark r10/r10r1 surfaces from light mode. */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full label{
    background:#f8fafc!important;
    color:#172033!important;
    border-color:#dce4ec!important;
    box-shadow:0 1px 2px rgba(15,23,42,.025)!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full label:hover{
    background:#f4f9fd!important;
    border-color:#87badd!important;
    box-shadow:0 2px 7px rgba(31,106,153,.08)!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full label:has(input:checked){
    background:#eaf6ff!important;
    border-color:#168fd1!important;
    box-shadow:inset 0 0 0 1px #168fd1,0 2px 7px rgba(22,143,209,.10)!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full .gift-image,
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full .gift-emoji{
    background:#ffffff!important;
    border:1px solid #e4eaf0!important;
    box-shadow:0 1px 2px rgba(15,23,42,.04)!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-choices.gift-full label>b{
    color:#172033!important;
    font-weight:750!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-price{
    color:#7c8a9a!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-price .material-symbols-outlined,
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-price .lucide-icon{
    color:#90a2b4!important;
  }

  /* Message box */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup textarea[name="message"]{
    background:#f8fafc!important;
    color:#172033!important;
    border-color:#dce4ec!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup textarea[name="message"]::placeholder{
    color:#8c98a7!important;
    opacity:1!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup textarea[name="message"]:focus{
    outline:0!important;
    background:#ffffff!important;
    border-color:#4aa3d8!important;
    box-shadow:0 0 0 3px rgba(74,163,216,.11)!important;
  }

  /* Footer row */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-anon{
    color:#475569!important;
    display:inline-flex!important;
    align-items:center!important;
    gap:7px!important;
    line-height:1!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .profile-gift-anon input{
    width:16px!important;
    height:16px!important;
    margin:0!important;
    accent-color:#168fd1!important;
  }

  /* Exact fix requested: button + history icon no longer drift apart. */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history-toggle{
    min-width:166px!important;
    height:34px!important;
    min-height:34px!important;

    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;

    margin:0!important;
    padding:0 13px!important;

    border:1px solid #d7e0e8!important;
    border-radius:8px!important;
    background:#f8fafc!important;
    color:#64748b!important;

    font-size:10.5px!important;
    font-weight:650!important;
    line-height:1!important;
    white-space:nowrap!important;

    box-sizing:border-box!important;
    vertical-align:middle!important;
    cursor:pointer!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history-toggle:hover{
    background:#f1f6fa!important;
    color:#334155!important;
    border-color:#b8c7d5!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history-toggle .material-symbols-outlined,
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history-toggle .lucide-icon{
    position:static!important;
    inset:auto!important;
    transform:none!important;

    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;

    width:17px!important;
    min-width:17px!important;
    max-width:17px!important;
    height:17px!important;
    min-height:17px!important;
    max-height:17px!important;

    margin:0!important;
    padding:0!important;
    flex:0 0 17px!important;

    color:#73859a!important;
    font-size:17px!important;
    line-height:17px!important;
    vertical-align:middle!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history-toggle .lucide-icon{
    stroke-width:2!important;
  }

  /* History results when opened */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history{
    color:#334155!important;
    scrollbar-color:#b0becb #f4f7fa!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history article{
    background:#f8fafc!important;
    color:#334155!important;
    border-color:#e0e7ee!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history article b{
    color:#172033!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .gift-history article small{
    color:#718096!important;
  }

  /* Submit */
  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .feature-primary[type="submit"]{
    background:#397ff0!important;
    color:#ffffff!important;
    border:0!important;
    box-shadow:0 3px 9px rgba(57,127,240,.17)!important;
  }

  html:not([data-theme="dark"]) #featureLayer > .profile-gift-popup .feature-primary[type="submit"]:hover{
    background:#2d73e7!important;
  }
}

/* Dark desktop is intentionally untouched.
   Mobile <=767px remains entirely under r16 mobile gift rules. */
