/* js minify islemi icin..: https://www.toptal.com/developers/javascript-minifier */
/* css minify islemi icin.: https://www.toptal.com/developers/cssminifier */
.bg-card-ved {
    background-color: #FFFFF0;
}

.text-ph-ved {
    color: #0daef4 !important;
}

.text-orp-ved {
    color: #FF6A00 !important;
}

/* switch ----------------------------------------------- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #6c757d;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.4s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

.toggle-switch input:checked+.slider {
    background-color: #0d6efd;
}

.toggle-switch input:checked+.slider::before {
    transform: translateX(22px);
}

/* toggle-switch Disabled durumu için stiller */
.toggle-switch input:disabled+.slider {
    opacity: 0.2;
    /* Opaklığı azalt */
    cursor: not-allowed;
    /* Fare imlecini değiştir */
}

/* front login ---------------------------------- */
body.bg-darken-front {
    /* Koyu gri ton, kontrasti artirir */
    background-color: #2c2f33 !important;
}

/* Card kenar bosluklarini acip cercevesini vrugulayalim. */
body.bg-darken-front .card {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: #ffffff;
}

/* adm login ------------------------------------ */
body.bg-darken-adm {
    /* Koyu gri ton, kontrasti artirir */
    background-color: #DC4C64 !important;
}

/* Card kenar bosluklarini acip cercevesini vrugulayalim. */
body.bg-darken-adm .card {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: #ffffff;
}

/* devices sayfasindaki sutunlarin genislikleri*/
.devices-table {
    min-width: 650px;
}

.devices-table th.int-column {
    width: 50px;
}

.devices-table th.device-id-column {
    min-width: 150px;
}

.devices-table th.actions-column {
    min-width: 100px;
}

.devices-table th.note-column {
    min-width: 320px;
}

/* Tüm tablo hücrelerini dikeyde ortala */
.devices-table td,
.admdevices-table td,
.admusers-table td {
    vertical-align: middle !important;
}

/* admin/devices sayfasindaki sutunlarin genislikleri*/
.admdevices-table {
    min-width: 650px;
}

.admdevices-table th.int-column {
    width: 50px;
}

.admdevices-table th.admdevices-deviceid-column {
    min-width: 250px;
}

.admdevices-table th.admdevices-actions-column {
    min-width: 200px;
}

.admdevices-table th.admdevices-note-column {
    min-width: 320px;
}

.admdevices-table th.fw-version-column {
    min-width: 120px;
}

.admdevices-table th.fw-status-column {
    min-width: 120px;
}

/* Remote sütunu genişliği*/
.admdevices-table th.admdevices-remote-column {
    min-width: 120px;
}

/* Son Tarih Saat sütunu genişliği */
.admdevices-table th.fw-datetime-column {
    min-width: 230px;
}

.admdevices-table th.fw-approval-column {
    min-width: 80px;
}

/* FW versiyon ve durum metin stilleri */
.fw-version-text {
    font-family: 'Courier New', monospace;
    font-size: 1em;
    font-weight: bold;
    color: #198754;
    border-radius: 4px;
    display: inline-block;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.fw-status-text {
    font-family: 'Courier New', monospace;
    font-size: 1em;
    font-weight: bold;
    color: #dc3545;
    border-radius: 4px;
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* Son Tarih Saat metin stili */
.fw-datetime-text {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: bold;
    color: #dc3545;
    border-radius: 4px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    vertical-align: middle;
}

/* admin/users sayfasindaki sutunlarin genislikleri*/
.admusers-table {
    min-width: 600px;
}

.admusers-table th.admusers-email-column {
    min-width: 400px;
}

.admusers-table th.admusers-actions-column {
    min-width: 200px;
}

.admusers-table th.admusers-note-column {
    min-width: 320px;
}

/* devices.ejs FW Info Modal Ozel Stilleri */
.fw-info-modal {
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

.fw-info-modal .modal-body {
    white-space: pre-line;
    overflow-y: auto;
    flex: 1 1 auto;
}

/* --- Admin remote.ejs Sayfası Stilleri --- */
.remote-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.message-area {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.75rem;
    min-height: 250px;
    /* Minimum yükseklik (300'den 250'ye düşürdük) */
    max-height: 250px;
    /* Maksimum yükseklik - scroll burada çıkacak */
    overflow-y: auto;
    /* Dikey kaydırma */
    overflow-x: hidden;
    /* Yatay kaydırma yok */
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 15px;
    /* Alt boşluk */
}

/* input-group için üst boşluk ekleyelim */
.remote-card .input-group {
    margin-top: 10px;
}

.outgoing-input {
    font-family: 'Courier New', monospace;
}

.timestamp {
    font-size: 0.9rem;
    font-weight: bold;
    color: #6c757d;
    margin-right: 5px;
}

.incoming-msg {
    color: #0d6efd;
    margin-bottom: 5px;
    border-bottom: 1px dotted #e9ecef;
    padding-bottom: 3px;
}

.outgoing-msg {
    color: #198754;
    margin-bottom: 5px;
    border-bottom: 1px dotted #e9ecef;
    padding-bottom: 3px;
}

/* Robot durum70 kartları için stiller */
.bg-card-ved {
    background-color: #FFFFF0;
}

/* fabrika ayarlarina don, servis ayarlarini kaydet buttonuna tiklandiginda Geri bildirim animasyonu için yeni sınıf */
.feedback-blink {
    background-color: #ffcccc !important;
    /* Açık kırmızı bir ton */
    transition: background-color 0.3s ease;
}

.two-line-fixed {
    min-height: 4rem;
    /* En az iki satırlık alan */
    height: auto;
    /* İçeriğe göre büyüyebilir */
    display: flex;
    align-items: center;
    /* Dikey ortalama */
    justify-content: center;
    /* Yatay ortalama */
    line-height: 1.5;
    /* Satır yüksekliği */
    padding: 0.25rem 0;
    /* Üst-alt iç boşluk */
    word-break: break-word;
    /* Uzun kelimeleri böl */
}

/* Serbest Gezinti Container ve Butonları */
.serbest-gezinti-container {
    position: relative;
}

/* Serbest Gezinti Container disabled class'ı aldığında içindeki tüm butonları devre dışı bırak */
.serbest-gezinti-container.disabled .serbest-gezinti-btn {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
    /* Tüm tıklama olaylarını engeller */
}

.serbest-gezinti-btn {
    width: 100px;
    height: 100px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: transform 0.2s;
}

.serbest-gezinti-btn:hover:not(:disabled) {
    /* hover durumundaki scale */
    transform: scale(1.0);
}

.serbest-gezinti-btn:active:not(:disabled) {
    /* buttona basildiginda ice cokme miktari */
    transform: scale(0.9);
}

.serbest-gezinti-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;

}

/* Tüm buton içindeki resimler için long click önleme */
button img {
    /* Fare/touch olaylarını resmin değil, butonun yakalamasını sağlar */
    pointer-events: none;
    /* iOS cihazlarda long press yapıldığında çıkan menüyü (kopyala, yapıştır, görüntüyü ara vb.) engeller */
    -webkit-touch-callout: none;
    /* Safari tarayıcısında metin/görüntü seçimini engeller */
    -webkit-user-select: none;
    /* Konqueror tarayıcısında metin/görüntü seçimini engeller */
    -khtml-user-select: none;
    /* Firefox tarayıcısında metin/görüntü seçimini engeller */
    -moz-user-select: none;
    /* Internet Explorer ve Edge tarayıcılarında metin/görüntü seçimini engeller */
    -ms-user-select: none;
    /* Tüm modern tarayıcılarda metin/görüntü seçimini engeller (standart özellik) */
    user-select: none;
    /* Mobil cihazlarda dokunulan elementin etrafında çıkan gri vurgu kutusunu kaldırır */
    -webkit-tap-highlight-color: transparent;
    /* Yakınlaştırma, kaydırma gibi çoklu dokunma hareketlerini engeller, 
           sadece tekil dokunma (tıklama) işlemlerine izin verir */
    touch-action: manipulation;
}

/* ib-action-btn */
#ib-action-btn {
    padding: 5px !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#ib-action-btn img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    margin: 0 !important;
    padding: 0 !important;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

/* program, calisma suresi, gck suresi comboboxlari disabled oldugunda opakligi azaltmak icin. */
select.form-select:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #e9ecef;
}