/**********************************************************************
 * Web Ticket V2 — modern vatandaş formu teması
 * Yalnızca web-ticket-v2.html tarafından yüklenir; V1 sayfasını etkilemez.
 * app.css / main-theme*.css üzerine ince bir katman olarak çalışır.
 **********************************************************************/

html {
    background-color: #eef2f7 !important;
}

body.wtv2-body {
    background-color: #eef2f7;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Sayfa iskeleti ---------- */

.wtv2-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px 14px 60px;
}

.wtv2-company-message {
    margin: 0 0 12px;
}

/* Alt bilgi (endingMessage): kartın dibine yapışmasın, kart içeriğiyle aynı hizadan başlasın */
.wtv2-shell > .wtv2-company-message:last-child {
    margin: 18px 0 0;
    padding: 0 28px;
    color: #4b5563;
}

.wtv2-company-message img {
    max-width: 100%;
    height: auto;
}

/* ---------- Sekmeler (Talep Ekle / Talep Sorgula) ---------- */

.wtv2-tabs {
    display: flex;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

.wtv2-tab {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #475569;
    user-select: none;
    transition: background-color .15s ease, color .15s ease;
}

.wtv2-tab i {
    margin-right: 7px;
    opacity: .85;
}

.wtv2-tab:hover {
    background: #f1f5f9;
}

.wtv2-tab.active {
    background: #0072c6;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 114, 198, .35);
}

/* ---------- Form kartı ---------- */

.wtv2-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 28px 28px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

/* ---------- Bölüm başlıkları ---------- */

.wtv2-body td.wt-header {
    font-size: 15px;
    font-weight: 700;
    color: #114b7f;
    border-bottom: 2px solid #e3edf7;
    padding: 28px 4px 8px 0;
    letter-spacing: .2px;
}

/* ---------- Satırlar ve etiketler ---------- */

.wtv2-body td.web-ticket-label {
    width: 200px;
    padding: 12px 18px 12px 0;
    font-weight: 600;
    font-size: 13.5px;
    color: #374151;
    vertical-align: middle;
}

/* Talep Sorgula ekranındaki etiket kolonu (wt-label) — tüm satırlarda aynı genişlik/hiza */
.wtv2-body td.wt-label {
    width: 233px;
    padding: 12px 18px 12px 0;
    font-weight: 600;
    font-size: 13.5px;
    color: #374151;
    vertical-align: middle;
}

.wtv2-body tr.wt-row > td {
    border-bottom: 1px solid #f1f5f9;
    padding-top: 7px;
    padding-bottom: 7px;
}

.wtv2-body .wt-required {
    color: #dc2626;
}

/* ---------- Girdi alanları ---------- */

.wtv2-body .form-element-input,
.wtv2-body .form-element-textarea,
.wtv2-body .form-control,
.wtv2-body .ui-select-toggle {
    border: 1px solid #d5dce6 !important;
    border-radius: 8px !important;
    background-color: #fbfcfe;
    box-shadow: none;
    font-size: 14px;
    color: #1f2937;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.wtv2-body .form-element-input,
.wtv2-body .form-control,
.wtv2-body .ui-select-toggle {
    min-height: 38px;
    padding: 7px 12px;
}

.wtv2-body .form-element-textarea {
    height: 130px;
    padding: 10px 12px;
}

.wtv2-body .form-element-input:focus,
.wtv2-body .form-element-textarea:focus,
.wtv2-body .form-control:focus,
.wtv2-body .ui-select-container.open .ui-select-toggle {
    border-color: #0072c6 !important;
    box-shadow: 0 0 0 3px rgba(0, 114, 198, .14) !important;
    background-color: #ffffff;
    outline: none;
}

.wtv2-body .ui-select-container {
    min-width: 220px;
}

/* ---------- Görev tipi grubu çipleri ---------- */

.wtv2-body label.wtv2-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d5dce6;
    border-radius: 999px;
    padding: 8px 16px !important;
    margin: 4px 8px 4px 0;
    background: #ffffff;
    font-weight: 500;
    font-size: 13.5px;
    color: #374151;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.wtv2-body label.wtv2-chip:hover {
    border-color: #0072c6;
    background: #f4f9fe;
}

.wtv2-body label.wtv2-chip.active {
    border-color: #0072c6;
    background: #e7f2fb;
    color: #075a9a;
    font-weight: 600;
}

.wtv2-body label.wtv2-chip input[type="radio"] {
    margin: 0;
    accent-color: #0072c6;
}

/* ---------- Dosya / fotoğraf yükleme ---------- */

.wtv2-body label.wtv2-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    margin: 6px 0;
    border: 1px dashed #9db8d2;
    border-radius: 8px;
    background: #f6faff;
    color: #0072c6;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.wtv2-body label.wtv2-upload:hover {
    background: #eaf4ff;
    border-color: #0072c6;
}

.wtv2-body label.wtv2-upload i {
    font-size: 16px;
}

/* Yüklenen dosya satırları: eski keskin gri kutu (inline stil) yerine girdi alanlarıyla aynı dil.
   Satırlar sınıfsız div'ler olduğundan ng-repeat özniteliğiyle hedeflenir; inline stiller !important ile ezilir. */
.wtv2-body div[ng-repeat*="fileList"] {
    border: 1px solid #d5dce6 !important;
    border-radius: 8px;
    padding: 8px 12px !important;
    margin-top: 8px !important;
    background-color: #f6faff !important;
}

.wtv2-body .task-comment-file {
    color: #0a6ebd;
    cursor: pointer;
}

.wtv2-body .task-comment-button {
    color: #dc2626;
}

/* Fotoğraf küçük resimleri */
.wtv2-body .task-image-thumbnail {
    border: 1px solid #d5dce6;
    border-radius: 8px;
    background: #ffffff;
    padding: 2px;
}

/* ---------- Butonlar ---------- */

.wtv2-body .btn-primary {
    background: linear-gradient(180deg, #0080d6, #006ab8) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600;
    padding: 9px 20px;
    height: auto;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .15);
    transition: filter .15s ease;
}

.wtv2-body .btn-primary:hover:not([disabled]) {
    filter: brightness(1.08);
}

.wtv2-body .btn-primary[disabled] {
    opacity: .5;
    box-shadow: none;
}

/* ---------- reCAPTCHA ----------
   Widget'ın içi Google iframe'idir, içeriği stillenemez. Google'ın kendi gri
   çerçevesi 2px kırpılır ve yerine sayfadaki girdilerle aynı çerçeve/köşe giydirilir;
   resim doğrulama penceresi ayrı bir katmanda açıldığı için bu kırpmadan etkilenmez. */

.wtv2-body div[vc-recaptcha] {
    display: inline-block;
    width: 300px;
    height: 74px;
    overflow: hidden;
    border: 1px solid #d5dce6;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
    background: #f9f9f9;
    line-height: 0;
    margin: 2px 0;
}

.wtv2-body div[vc-recaptcha] iframe {
    margin: -2px 0 0 -2px;
}

/* ---------- Harita ---------- */

.wtv2-body #webLocationMapContainer {
    border-radius: 10px;
    overflow: hidden;
    border-color: #d5dce6 !important;
}

/* ---------- Taleplerim listesi (telefonla sorgu) ---------- */

.wtv2-body table.wtv2-mytasks {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    font-size: 13.5px;
}

.wtv2-body table.wtv2-mytasks th {
    background: #f3f7fc;
    color: #114b7f;
    font-weight: 700;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.wtv2-body table.wtv2-mytasks td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.wtv2-body table.wtv2-mytasks tr:last-child td {
    border-bottom: none;
}

.wtv2-body table.wtv2-mytasks tr[ng-repeat] {
    cursor: pointer;
}

.wtv2-body table.wtv2-mytasks tr:hover td {
    background: #f6faff;
}

.wtv2-body table.wtv2-mytasks tr:first-child:hover th {
    background: #f3f7fc;
}

/* ---------- Uyarı/Hata modalları (dialogService) ----------
   Ortak dialog-service'e dokunulmaz; yalnızca bu sayfada modal görünümü modernleştirilir.
   Mesaj gövdesindeki inline stiller (overflow-y: scroll, font-size: 20px) !important ile ezilir. */

.wtv2-body .modal-content {
    border: none;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .25);
    overflow: hidden;
}

.wtv2-body .modal-header {
    background: #f6f9fc;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 22px;
}

.wtv2-body .modal-header .modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #114b7f;
}

.wtv2-body .modal-header .close {
    font-size: 22px;
    color: #94a3b8;
    opacity: 1;
}

.wtv2-body .modal-content > div[style] {
    overflow-y: auto !important;
    font-size: 15px !important;
    line-height: 1.65;
    padding: 20px 22px !important;
    text-align: left !important;
    color: #374151;
}

.wtv2-body .modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 12px 22px;
    background: #fbfcfe;
}

.wtv2-body .modal-footer .btn-bricky {
    background: linear-gradient(180deg, #0080d6, #006ab8) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    padding: 8px 26px;
    font-weight: 600;
}

.wtv2-body .modal-backdrop.in {
    opacity: .55;
}

/* ---------- Sonuç / kapalı form ekranları ---------- */

.wtv2-success {
    text-align: center;
    padding: 70px 20px 60px;
}

.wtv2-success > i.fa-check-circle {
    font-size: 62px;
    color: #16a34a;
    display: block;
    margin-bottom: 18px;
}

.wtv2-success p {
    font-size: 15px;
    color: #374151;
}

.wtv2-closed {
    text-align: center;
    padding: 70px 20px 60px;
}

.wtv2-closed > i {
    font-size: 54px;
    display: block;
    margin-bottom: 16px;
    color: #94a3b8;
}

.wtv2-closed p {
    font-size: 15px;
}

/* ---------- Gömülü mod (iframe) ----------
   Sayfa bir iframe içinde açıldığında entry HTML'deki script html
   elementine .wtv2-embedded ekler; zemin şeffaflaşır, kart çerçevesi
   kalkar ve içerik iframe genişliğine yayılır. */

html.wtv2-embedded {
    background: transparent !important;
}

html.wtv2-embedded body.wtv2-body {
    background: transparent;
    padding-bottom: 0;
}

html.wtv2-embedded .wtv2-shell {
    max-width: none;
    padding: 0 0 20px;
}

html.wtv2-embedded .wtv2-card {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 10px 20px;
}

html.wtv2-embedded .wtv2-tabs {
    box-shadow: none;
}

/* ---------- Küçük ekranlar ---------- */

@media (max-width: 640px) {

    .wtv2-card {
        padding: 6px 16px 20px;
    }

    .wtv2-shell > .wtv2-company-message:last-child {
        padding: 0 16px;
    }

    .wtv2-body td.web-ticket-label {
        display: block;
        width: 100%;
        padding: 12px 0 2px;
    }

    .wtv2-body td.wt-label {
        display: block;
        width: 100% !important;
        padding: 12px 0 2px;
    }

    .wtv2-body tr.wt-row > td {
        display: block;
        width: 100%;
    }

    .wtv2-body td.wt-header {
        display: block;
        width: 100%;
    }

    /* Sorgu modu çipleri alt alta tam genişlik */
    .wtv2-body label.wtv2-chip {
        display: flex;
        width: 100%;
        margin: 4px 0;
        justify-content: flex-start;
    }

    /* Taleplerim listesi: kompakt hücreler, konu kolonu satır kaydırabilir */
    .wtv2-body table.wtv2-mytasks th,
    .wtv2-body table.wtv2-mytasks td {
        padding: 8px 8px;
        font-size: 12.5px;
    }

    .wtv2-body table.wtv2-mytasks td {
        word-break: break-word;
    }
}
