/* =====================================================================
   Tekno Hosting — okunabilirlik + mobil katmanı (coowhm-tekno)
   coowhm-style-2'nin CSS'ine dokunmaz; en son yüklenir ve üstüne yazar.
   Geri dönmek için: WHMCS → Setup → General Settings → Template = coowhm-style-2

   Not: Bootstrap 3 html{font-size:10px} yapar. Bazı özel sayfalar rem'i
   16px tabanına göre yazmış (0.9rem → 9px görünüyordu). O sayfalarda taban
   sayfa bazında düzeltilir: html.tpl-<şablon adı>.
   ===================================================================== */

:root {
    --tk-text: #1e293b;
    --tk-body: #334155;
    --tk-muted: #64748b;
    --tk-green: #10b981;
    --tk-green-dark: #047857;
    --tk-border: #e2e8f0;
}

/* ---------- 1. Genel okunabilirlik ---------- */
body {
    font-size: 15px;
    font-weight: 400;
    color: var(--tk-body);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
p, p.text-muted { font-size: 15px; line-height: 1.7; }
strong, b { font-weight: 600; }
.text-muted { color: var(--tk-muted); }
img, video, iframe { max-width: 100%; }
img { height: auto; }

/* iOS: 16px altındaki form alanına dokununca sayfa yakınlaşıyor */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select, textarea, .form-control {
    font-size: 16px !important;
}
.form-control { min-height: 44px; }
textarea.form-control { min-height: 110px; }

/* Uzun kelime / URL taşmasın */
.main-content, .content-padded, .panel-body, .card-body { overflow-wrap: break-word; }

/* ---------- 2. Rem tabanı düzeltmesi (16px'e göre yazılmış sayfalar) ---------- */
html.tpl-knowledgebase,
html.tpl-knowledgebasecat,
html.tpl-knowledgebasearticle,
html.tpl-announcements,
html.tpl-viewannouncement { font-size: 16px; }
/* Müşteri paneli: Hizmetlerim (7.5px etiketler), Faturalar (8.5px), Hizmet detayı (7.8px).
   Ana sayfa (clientareahome) 10px tabana göre ayarlı — ona dokunulmaz. */
html.tpl-clientareaproducts,
html.tpl-clientareainvoices,
html.tpl-clientareaproductdetails { font-size: 16px; }

/* Ortak küçük yazılar (menü, yan liste, form etiketleri) */
.coodiv-mtext { font-size: 13px !important; }
.navigation-header i, .navigation-header { font-size: 12px !important; }
.user-info { font-size: 13px !important; }
.user-services, .user-invoices { font-size: 12px !important; }
.list-group-item { font-size: 14px; }
label, .control-label { font-size: 14px; }
.footer-copyright { font-size: 13px; }

/* Müşteri ana sayfası — tek tek küçük kalanlar */
.da-action-desc { font-size: 13px !important; }
.da-svc-p { font-size: 14px !important; }
.da-status-badge { font-size: 12px !important; }

/* ---------- 3. Bilgi bankası ---------- */
/* Arama: input flex içinde küçülebilsin → "Ara" butonu taşmasın */
.kb-search-input, .kb-input { min-width: 0; width: 100%; }
.kb-search-box { max-width: 100%; }

.kb-article-title h2 {
    font-size: 30px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--tk-text);
    margin: 0 0 20px;
    padding-right: 44px;
}
.kb-article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--tk-text);
    font-weight: 400;
    overflow-wrap: break-word;
}
.kb-article-content p,
.kb-article-content li,
.kb-article-content td,
.kb-article-content th,
.kb-article-content span,
.kb-article-content div {
    font-size: inherit !important;
    line-height: inherit;
    color: inherit;
}
.kb-article-content p { margin: 0 0 1.1em; }
.kb-article-content h2, .kb-article-content h3, .kb-article-content h4 {
    color: var(--tk-text);
    font-weight: 700;
    line-height: 1.35;
    margin: 1.6em 0 .6em;
}
.kb-article-content h2 { font-size: 1.45em; }
.kb-article-content h3 { font-size: 1.25em; }
.kb-article-content h4 { font-size: 1.1em; }
.kb-article-content ul, .kb-article-content ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.kb-article-content li { margin-bottom: .35em; }
.kb-article-content a { color: var(--tk-green-dark); text-decoration: underline; }
.kb-article-content strong { color: #0f172a; font-weight: 700; }
.kb-article-content img { max-width: 100%; height: auto; border-radius: 12px; margin: .6em 0; }
.kb-article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.kb-article-content td, .kb-article-content th { border: 1px solid var(--tk-border); padding: 8px 12px; }
.kb-article-content pre, .kb-article-content code {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: .88em !important;
    background: #f1f5f9;
    border-radius: 8px;
}
.kb-article-content code { padding: 2px 6px; }
.kb-article-content pre { padding: 14px 16px; }
.kb-article-content blockquote {
    border-left: 4px solid var(--tk-green);
    background: #f0fdf4;
    margin: 1em 0;
    padding: 12px 16px;
    border-radius: 0 10px 10px 0;
    font-size: inherit;
}
.kb-article-details { font-size: 14px; color: var(--tk-muted); }
.kb-rate-article { font-size: 15px; }
.kb-also-read h3 { font-size: 20px; }
.kb-also-read .kbarticles a { font-size: 16px; font-weight: 600; }
.kb-also-read .kbarticles p { font-size: 14px; color: var(--tk-muted); }
/* Kategori sayfası: koyu zemindeki başlık koyu renkte kalıyordu (h1-h6 #111 kuralı) */
.kb-hero .kb-title { color: #fff; }
/* Makale başlıkları "..." ile kesilmesin, satır kırsın */
.art-title { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.4; }
.art-desc { max-width: 100%; }
.breadcrumb { scrollbar-width: none; }
.breadcrumb::-webkit-scrollbar { display: none; }

/* ---------- 3b. Ürün detay sayfası ---------- */
/* Diğer ürünler (cPanel, lisans): başlık = ürün adı, grup adı küçük üst etiket */
.tk-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tk-muted); margin-bottom: 6px; }
.da-head-info h1 { font-size: 28px !important; line-height: 1.25; letter-spacing: -.5px; }

/* VDS: iki sütun (sol modül ekranı, sağ fatura + işlemler) */
.tk-pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; margin-top: 4px; }
.tk-pd-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 90px; }
.tk-pd-alert { display: flex; gap: 10px; align-items: center; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 14px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }

.tk-card { background: #fff; border: 1px solid var(--tk-border); border-radius: 20px; padding: 20px; font-size: 14px; color: var(--tk-text); }
.tk-card-h { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 14px; }
.tk-card-h i { width: 30px; height: 30px; border-radius: 10px; background: #ecfdf5; color: #059669; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

.tk-price { font-size: 30px; font-weight: 800; color: #0f172a; letter-spacing: -.5px; line-height: 1.1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tk-price small { font-size: 13px; font-weight: 600; color: var(--tk-muted); letter-spacing: 0; }

.tk-dl { margin: 0 0 16px; }
.tk-dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--tk-border); }
.tk-dl dt { font-weight: 500; color: var(--tk-muted); font-size: 13.5px; }
.tk-dl dd { margin: 0; font-weight: 700; color: #0f172a; font-size: 14px; text-align: right; }
.tk-dl dd.tk-hl { color: var(--tk-green-dark); }

.tk-btn-ghost { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--tk-border); background: #f8fafc; color: #0f172a !important; font-weight: 700; font-size: 14px; text-decoration: none !important; transition: .15s; }
.tk-btn-ghost:hover { border-color: var(--tk-green); background: #ecfdf5; }

.tk-actions { display: flex; flex-direction: column; margin: 0 -8px; }
.tk-actions a { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; color: #1e293b !important; font-weight: 600; font-size: 14.5px; text-decoration: none !important; transition: background .15s; }
.tk-actions a:hover { background: #f1f5f9; }
.tk-actions a i:first-child { width: 32px; height: 32px; border-radius: 10px; background: #f1f5f9; color: #475569; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.tk-actions a:hover i:first-child { background: #ecfdf5; color: #059669; }
.tk-actions a span { flex: 1; }
.tk-actions a i:last-child { color: #cbd5e1; font-size: 12px; }
.tk-actions a.tk-danger { color: #b91c1c !important; }
.tk-actions a.tk-danger i:first-child { background: #fef2f2; color: #dc2626; }

@media (max-width: 1100px) {
    .tk-pd-grid { grid-template-columns: 1fr; }
    .tk-pd-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .tk-pd-side { grid-template-columns: 1fr; }
    .da-head-info h1 { font-size: 22px !important; }
    .da-prod-header { padding: 20px !important; }
}

/* ---------- 4. Tablolar ---------- */
.table-container, .dataTables_wrapper, .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------- 5. Üst menü (telefon): logo sepete biniyordu, "Çıkış" yazısı taşıyordu ---------- */
@media (max-width: 480px) {
    .mobile-logo-img { max-width: 112px !important; width: 112px !important; height: auto !important; }
    .btn-logout-top {
        font-size: 0 !important; width: 36px !important; height: 36px !important;
        display: inline-flex !important; align-items: center; justify-content: center;
    }
    .btn-logout-top i { font-size: 17px !important; margin: 0 !important; }
}

/* ---------- 5b. Ortak mobil alt menü (footer.tpl) ----------
   Eski sayfa-özel menüler (hizmetler, hizmet detayı, faturalar) gizlenir; her sayfada tek menü. */
.da-mobile-dock, .app-bottom-nav, .da-mobile-pill { display: none !important; }
.tkh-bottom-nav, .tkh-nav-spacer { display: none; }
@media (max-width: 767px) {
    .tkh-nav-spacer { display: block; height: calc(96px + env(safe-area-inset-bottom)); }
    .tkh-bottom-nav {
        display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 1040;
        background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
        border: 1px solid #e6eaf0; border-radius: 20px; box-shadow: 0 12px 30px -10px rgba(15,23,42,.35);
        padding: 6px; justify-content: space-around; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    }
    .tkh-bottom-nav a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 14px;
        font-size: 11px; font-weight: 700; line-height: 1.2; color: #64748b !important; text-decoration: none !important;
    }
    .tkh-bottom-nav a i { font-size: 17px; }
    .tkh-bottom-nav a.active { color: #047857 !important; background: #ecfdf5; }
    .tkh-bottom-nav .tkh-fab {
        flex: 0 0 auto; width: 52px; height: 52px; margin-top: -22px; border-radius: 16px; background: #10b981; color: #fff !important;
        display: grid; place-items: center; font-size: 20px; box-shadow: 0 10px 22px -8px rgba(16,185,129,.9); border: 4px solid #f4f6fa; padding: 0;
    }
}

/* ---------- 6. Mobil ---------- */
@media (max-width: 767px) {
    body { font-size: 15px; }
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
    h4 { font-size: 18px; }

    .kb-search-wrapper { padding: 22px 14px; border-radius: 18px; margin-bottom: 26px; }
    .kb-search-icon { padding-left: 12px; font-size: 18px; }
    .kb-search-input, .kb-input { padding: 12px 10px; }
    .kb-search-btn { padding: 12px 18px; flex-shrink: 0; }
    .kb-search-btn:hover { transform: none; }

    .kb-article-title h2 { font-size: 23px; }
    .kb-article-content { font-size: 17px; line-height: 1.75; }
    .kb-article-content h2 { font-size: 1.3em; }
    .kb-article-content h3 { font-size: 1.15em; }

    .article-row { padding: 16px 18px; gap: 14px; }
    .article-row:hover { transform: none; }
    .kb-hero { padding: 32px 18px !important; margin-bottom: 30px !important; }
    .kb-title { font-size: 1.6rem !important; }

    .btn { min-height: 42px; }

    /* Tablo arama kutuları (Faturalar vb.) tam genişlik */
    .dataTables_filter, .dataTables_filter label { width: 100% !important; float: none !important; display: block; text-align: left !important; }
    .dataTables_filter input { width: 100% !important; margin-left: 0 !important; box-sizing: border-box; }
    .breadcrumb { font-size: 14px; white-space: nowrap; overflow-x: auto; }
}
