/******************************************************
 * WooCommerce Sözleşmeler + Tablo Stilleri (revize)
 * - H4 başlık tema stiline döner
 * - Onay (checkbox) metni site genel fontuna döner
 * - Küçük font sadece kutu içi p/li metinlerinde
 ******************************************************/

/* Genel sözleşme kutusu */
.woocontractsic {
    width: 100% !important;
    padding: 6px 40px 10px 8px;
    height: 110px;
    background-color: #F4F4F4;
    overflow: auto;
}

/* Opsiyonel: %90 genişlik istenen konteyner */
.woocontractsdis { width: 90% !important; }

/* Sözleşmeler bölümü içindeki div'ler tam genişlik kalsın */
#sozlesmeler div { width: 100% !important; }

/* Birden fazla sözleşme kutusu kullanıyorsan */
#woocontracts1,
#woocontracts2,
#woocontracts3 {
    padding: 6px 40px 10px 8px;
    height: 110px;
    background-color: #F4F4F4;
    overflow: auto;
}

/* --- SADECE KUTU İÇİ METİNLERİ KÜÇÜLT --- */
.woocontractsic p,
.woocontractsic li,
#woocontracts1 p, #woocontracts1 li,
#woocontracts2 p, #woocontracts2 li,
#woocontracts3 p, #woocontracts3 li {
    font-size: 0.875rem;
    line-height: 1.6;
}

/* --- BÖLÜM BAŞLIĞI H4: TEMA STİLİNE ZORLA DÖN --- */
#sozlesmeler h4 {
    font-family: var(--wp--preset--font-family--heading, inherit) !important;
    font-size: var(--wp--preset--font-size--h4, 1rem) !important;
    font-weight: var(--wp--preset--font-weight--heading, 600) !important;
    line-height: var(--wp--custom--heading--line-height, 1.4) !important;
    margin: 0 0 .75rem !important;
    color: inherit !important;
}

/* --- ONAY (CHECKBOX) METNİ: SİTE GENEL FONTA DÖN --- */
.woocommerce-terms-and-conditions-wrapper .woocommerce-form__label,
.woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text,
.woocommerce-terms-and-conditions-wrapper label {
    font-family: inherit !important;
    font-size: var(--wp--preset--font-size--base, 1rem) !important;
    font-weight: var(--wp--preset--font-weight--base, 400) !important;
    line-height: var(--wp--custom--body--line-height, 1.5) !important;
    color: inherit !important;
}

/* --- TABLO STİLLERİ --- */
.tg {
    border-collapse: collapse;
    border-spacing: 0;
    border-color: #ccc !important;
    margin: 0 auto;
    width: 90%;
}

.tg td {
    font-family: Arial, sans-serif;
    font-size: 14px;
    padding: 10px 5px;
    border-style: solid !important;
    border-width: 1px !important;
    overflow: hidden;
    word-break: normal;
    border-color: #ccc !important;
    color: #333;
    background-color: #fff;
}

.tg th {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 5px;
    border-style: solid !important;
    border-width: 1px !important;
    overflow: hidden;
    word-break: normal;
    border-color: #ccc !important;
    color: #333;
    background-color: #f0f0f0;
}

.tg .tg-s6z2 { text-align: center; }
.tg .tg-hgcj { font-weight: bold; text-align: center; }

/* --- MOBİL DÜZEN --- */
@media screen and (max-width: 767px) {
    .tg { width: auto !important; }
    .tg col { width: auto !important; }

    .tg-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: auto 0;
    }

    .woocontractsic,
    #woocontracts1, #woocontracts2, #woocontracts3 {
        padding: 8px 12px;
        max-height: 40vh;
        height: auto;
    }
}

/* --- KUTULARA HAFİF YUVARLAMA VE GÖLGE (İSTEĞE BAĞLI) --- */
.woocontractsic,
#woocontracts1, #woocontracts2, #woocontracts3 {
    border-radius: 4px;
    /* box-shadow: 0 1px 2px rgba(0,0,0,.06); */
}
/************************************************************
 * WooCommerce Checkout — Sözleşmeler Başlık & Onay Metni Fix
 * Amaç:
 * - Başlık H4: tema başlık (heading) tipografisi
 * - Onay (checkbox) metni: sitenin body/base tipografisi
 * - Sözleşme kutusu içeriği küçük: sadece p/li
 ************************************************************/

/* 0) Ebeveynden gelen küçük punto mirasını nötrle (kutu seviyesinde) */
body.woocommerce-checkout .woocontractsic,
body.woocommerce-checkout #woocontracts1,
body.woocommerce-checkout #woocontracts2,
body.woocommerce-checkout #woocontracts3 {
  font-size: inherit !important;   /* küçük punto mirası iptal */
  line-height: inherit !important;
  font-family: inherit !important;
}

/* 1) Başlık: H4’ü tema başlık tipografisine zorla */
body.woocommerce-checkout #sozlesmeler h4,
body.woocommerce-checkout .woocontractsdis h4,
body.woocommerce-checkout .woocontractsic h4 {
  font-family: var(--wp--preset--font-family--heading, inherit) !important;
  font-size: var(--wp--preset--font-size--h4, 1.25rem) !important; /* ~20px */
  font-weight: var(--wp--preset--font-weight--heading, 700) !important;
  line-height: var(--wp--custom--heading--line-height, 1.4) !important;
  margin: 0 0 .75rem !important;
  color: inherit !important; /* tema rengi */
}

/* 2) Onay (checkbox) metni: body/base tipografisi */
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper label,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper .woocommerce-terms-and-conditions-checkbox-text,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label,
body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper .woocommerce-form__label .woocommerce-terms-and-conditions-checkbox-text {
  font-family: inherit !important; /* body ile aynı aile */
  font-size: var(--wp--preset--font-size--base, 1rem) !important; /* ~16px */
  font-weight: var(--wp--preset--font-weight--base, 400) !important;
  line-height: var(--wp--custom--body--line-height, 1.5) !important;
  color: inherit !important;
}

/* 3) Sözleşme içeriğini küçük yap — SADECE p/li */
body.woocommerce-checkout .woocontractsic p,
body.woocommerce-checkout .woocontractsic li,
body.woocommerce-checkout #woocontracts1 p, 
body.woocommerce-checkout #woocontracts1 li,
body.woocommerce-checkout #woocontracts2 p, 
body.woocommerce-checkout #woocontracts2 li,
body.woocommerce-checkout #woocontracts3 p, 
body.woocommerce-checkout #woocontracts3 li {
  font-size: 0.875rem !important; /* ~14px */
  line-height: 1.6 !important;
}

/* (İsteğe bağlı) Başlık gerçekten H4 elemanı değilse, “başlık” rolündeki etikete de uygula.
   Aşağıdakini sadece gerektiğinde aç: 
body.woocommerce-checkout #sozlesmeler .section-title,
body.woocommerce-checkout .woocontractsic .section-title { 
  font-size: 1.25rem !important; font-weight: 700 !important; line-height: 1.4 !important; 
}
*/
