﻿[contenteditable] {
    outline: 0px solid transparent;
}

.custom-form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    /* font-size: 1rem;
                    font-weight: 400; */
    line-height: 1.5;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    cursor: text;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .custom-form-control:focus {
/*        color: var(--bs-body-color);
        background-color: var(--bs-body-bg);*/
        border-color: #86b7fe;
        outline: none;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

    .custom-form-control[placeholder]:empty:before {
        content: attr(placeholder);
        /*color: var(--bs-secondary-color);*/
        opacity: 1;
        padding-top: 1.625rem;
        padding-bottom: 0.625rem;
    }

    .custom-form-control[placeholder]:empty:focus:before {
        position: absolute;
        inset: 1rem 0.375rem;
        z-index: -1;
        height: 1.5em;
        content: "1";
        /*background-color: var(--bs-body-bg);*/
        border-radius: var(--bs-border-radius);
    }

.openAnsForm {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}


.matrixForm {
    display: block;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: unset;
    background-clip: padding-box;
    border: 0px solid var(--bs-border-color);
    font-weight: normal !important
}

    .matrixForm:focus {
        color: var(--bs-body-color);
        border-color: #86b7fe;
        outline: 0;
        border: 0px solid var(--bs-border-color);
    }

    .matrixForm[placeholder]:empty:before {
        content: attr(placeholder);
        color: var(--bs-secondary-color);
        opacity: 1;
        padding-top: 1.625rem;
        padding-bottom: 0.625rem;
    }

    .matrixForm[placeholder]:empty:focus:before {
        position: absolute;
        inset: 1rem 0.375rem;
        z-index: -1;
        height: 1.5em;
        content: "";
        /*background-color: var(--bs-body-bg);*/
        border-radius: var(--bs-border-radius);
    }

div.custom-form-control {
    min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
}

.slider-text {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}


.fade-in-row {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

    .fade-in-row.show {
        opacity: 1;
        transform: translateY(0);
    }

.matrix-highlight {
    background-color: rgba(0, 123, 255, 0.07);
    transition: background-color 0.6s ease;
    border-radius: 2px;
}

.col-slide-in {
    animation: slideRightGlow 0.5s ease-out;
    background-color: rgba(0, 123, 255, 0.06);
}

@keyframes slideRightGlow {
    0% {
        transform: translateX(60%);
        opacity: 0.1;
    }

    70% {
        transform: translateX(0);
        opacity: 0.95;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

th, td {
    transition: background-color 0.6s ease;
}

.col-slide-out {
    animation: slideOutRight 0.5s ease-in;
    background-color: rgba(255, 0, 0, 0.06);
}

@keyframes slideOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    60% {
        transform: translateX(30%);
        opacity: 0.5;
    }

    100% {
        transform: translateX(80%);
        opacity: 0;
    }
}

#throbberMessage {
    transition: opacity 0.4s ease;
    opacity: 1;
}

    #throbberMessage.fade-out {
        opacity: 0;
    }

/* Demografik Seçim Stilleri */
.demographic-badge {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

    .demographic-badge:hover {
        transform: translateY(-2px);
    }

    .demographic-badge.selected {
        background-color: #28a745 !important; /* Yeşil */
    }

        .demographic-badge.selected:hover {
            background-color: #218838 !important; /* Koyu yeşil */
        }

    .demographic-badge:not(.selected) {
        background-color: #6c757d !important; /* Gri */
    }

        .demographic-badge:not(.selected):hover {
            background-color: #5a6268 !important; /* Koyu gri */
        }

/* --- View Controls (Normal Akışta) --- */
.view-controls {
    /* position: fixed; kaldırıldı */
    /* top ve right özellikleri kaldırıldı */
    background-color: rgba(255, 255, 255, 0.98); /* Neredeyse opak beyaz */
    padding: 8px 12px; /* Daha az padding */
    border-radius: 8px; /* Daha küçük radius */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Daha yumuşak gölge */
    z-index: 1000; /* Fixed olmasa da yüksek z-index kalabilir ama artık gerekli değil */
    display: flex;
    gap: 8px; /* Butonlar arası boşluk */
    border: 1px solid #e0e0e0; /* Hafif kenarlık */
    margin-bottom: 30px; /* Anket ile arasına boşluk */
    width: fit-content; /* İçeriği kadar genişlik */
    margin-left: auto; /* Sağa hizala */
    margin-right: auto; /* Sağa hizala */
    align-self: flex-end; /* Sağ üste hizala (flex container içinde) */
    margin-top: 20px; /* Üst kenardan boşluk bırak */
}

    .view-controls button {
        padding: 8px 15px; /* Buton paddingi küçüldü */
        border: none; /* Kenarlık yok */
        border-radius: 6px; /* Daha az yuvarlak */
        cursor: pointer;
        background-color: #E0E0E0; /* Varsayılan gri buton */
        color: #333;
        font-size: 14px;
        font-weight: 500;
        transition: background-color 0.2s ease, transform 0.1s ease;
        box-shadow: none; /* Butonlarda gölge yok */
    }

        .view-controls button:hover {
            background-color: #D0D0D0; /* Hover rengi */
            transform: none; /* Hover'da hareket etmesin */
        }

        .view-controls button.active {
            background-color: #007bff; /* Aktif butona mavi renk */
            color: white;
            box-shadow: none;
            transform: none; /* Aktifken de hareket etmesin */
        }

/* Ana içerik kapsayıcısı */
.main-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    flex-grow: 1;
    padding: 0 20px 20px 20px; /* Alttan boşluk bırak */
    box-sizing: border-box;
}

/* --- Survey Wrapper: Arka Plan, Gölge, Border Yok (Varsayılan) --- */
.survey-wrapper {
    background-color: transparent; /* Arka plan şeffaf */
    border-radius: 0; /* Köşe yumuşatma yok */
    box-shadow: none; /* Gölge yok */
    transition: all 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    border: none; /* Kenarlık yok */
    width: 100%; /* Varsayılan olarak tam genişlik */
    max-width: 900px;
    min-height: 50vh;
    overflow-y: auto;
}

/* Simülasyon modları (çerçeve olarak kalacak) */
.mobile-view .survey-wrapper {
    width: 375px; /* iPhone X genişliği */
    min-height: 600px; /* Mobil cihaz yüksekliği için minimum */
    max-height: 60vh; /* Ekranın %80'ini geçmesin */
    border: 3px solid #343a40; /* Cihaz çerçevesi olarak kalacak */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3); /* Cihaz gölgesi olarak kalacak */
    background-color: white; /* Simülasyon içinde beyaz arka plan */
    border-radius: 12px; /* Simülasyon çerçevesi için radius */
    padding: 20px; /* İçerik için padding */
    box-sizing: border-box;
}

.tablet-view .survey-wrapper {
    width: 768px; /* iPad portre genişliği */
    min-height: 800px; /* Tablet cihaz yüksekliği için minimum */
    max-height: 80vh; /* Ekranın %90'ını geçmesin */
    border: 3px solid #6c757d; /* Cihaz çerçevesi olarak kalacak */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4); /* Cihaz gölgesi olarak kalacak */
    background-color: white; /* Simülasyon içinde beyaz arka plan */
    border-radius: 12px; /* Simülasyon çerçevesi için radius */
    padding: 30px; /* İçerik için padding */
    box-sizing: border-box;
}

.desktop-view .survey-wrapper {
    width: 90%; /* Ekranın %90'ını kapla */
    max-width: 1000px; /* Maksimum genişlik */
    min-height: 70vh; /* En az ekran yüksekliğinin %70'i */
    max-height: 80vh; /* En fazla ekran yüksekliğinin %80'ı */
    background-color: white; /* Bilgisayar görünümünde beyaz arka plan */
    border-radius: 12px; /* Bilgisayar görünümünde radius */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1); /* Bilgisayar görünümünde gölge */
    border: 1px solid #e0e0e0; /* Bilgisayar görünümünde hafif border */
    padding: 40px; /* İçerik için padding */
    box-sizing: border-box;
}

/* Medya Sorguları - GERÇEK DUYARLILIK */
@media (max-width: 768px) {
    .view-controls {
        position: static; /* Mobil ve tablette sabitliği kaldır */
        margin-bottom: 20px;
        width: 100%;
        justify-content: center; /* Ortala */
        box-shadow: none; /* Gölgeyi kaldır */
        background-color: transparent;
        padding: 0;
    }

    body {
        padding-top: 20px; /* Butonlar static olunca boşluğa gerek yok */
    }

    .main-content-wrapper {
        padding: 10px; /* Daha az padding mobil cihazlarda */
    }

    .survey-wrapper {
        width: 95%; /* Mobil/tablet görünümünde %95 genişlik */
        max-width: 500px; /* Belirli bir max genişlik */
        min-height: auto; /* Yüksekliği içeriğe bırak */
        max-height: none; /* Yükseklik kısıtlamasını kaldır */
    }

    /* Simülasyon modları bu @media kuralının içindeki genişliği geçersiz kılacak */
    .mobile-view .survey-wrapper,
    .tablet-view .survey-wrapper {
        width: auto; /* Simülasyonun kendi genişliğini almasını sağla */
    }

    .survey-content {
        padding: 20px;
    }

        .survey-content h2 {
            font-size: 1.8em;
        }
}

@media (max-width: 480px) {
    .view-controls button {
        font-size: 14px;
        padding: 8px 15px;
    }
}

/*.ui-sortable-placeholder {
    background: #E5E7EB;
    border: 2px dashed #9CA3AF;
    visibility: visible !important;
    height: 4.5rem;
    border-radius: 0.5rem;
    box-sizing: border-box;
}*/

@keyframes highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

/* Yer tutucunun animasyonu: Renk, gölge ve hafif büyüme animasyonu eklendi */
@keyframes pulse-placeholder {
    from {
        border-color: #a5b4fc;
        background-color: #eef2ff;
        box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
        transform: scale(1);
    }

    to {
        border-color: #818cf8;
        background-color: #e0e7ff;
        box-shadow: 0 0 20px rgba(129, 140, 248, 0.6);
        transform: scale(1.02);
    }
}

/* Sürükleme işlemi başladığında body'ye eklenecek sınıf */
.dragging {
    transition: opacity 0.3s ease-in-out;
}

/* Sürüklenen öğenin görünümü */
.ui-sortable-helper {
    transform: scale(1.05);
    cursor: grabbing;
}

/* Placeholder için özel stil */
.tab .ui-sortable-placeholder {
    background-color: #f3f4f6 !important;
    border: 2px dashed #93c5fd !important;
    height: 64px;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    visibility: visible !important;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
    animation: pulse-placeholder 1s infinite alternate;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 500;
}

    .tab .ui-sortable-placeholder::before {
        content: "Buraya Bırakın";
    }

/* Dinamik silme alanı için stil (altta) */
#delete-zone {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    width: 100%;
    background: linear-gradient(to top, rgba(239, 68, 68, 0.7), rgba(239, 68, 68, 0));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transform: translateY(100px);
    transition: transform 0.3s ease-in-out, background 0.2s ease-in-out;
    z-index: 1000;
}

/* Silme alanı aktif hale geldiğinde */
body.dragging #delete-zone {
    transform: translateY(0);
}

/* Silme alanının üzerine gelindiğinde */
#delete-zone.ui-droppable-hover {
    background-color: rgba(220, 38, 38, 0.9);
    animation: none;
}

#delete-zone i {
    font-size: 2.5rem;
    margin-right: 1rem;
}

#delete-zone span {
    font-weight: 600;
}

/* Body ve Container stili */
.body-bg {
    background-color: #e2e8f0; /* Açık gri-mavi arka plan */
}

.card-container {
    background-color: #ffffff;
}

/* Sürükleme ikonu (tutma yeri) */
.cursor-grab {
    transition: all 0.2s ease-in-out;
}

    .cursor-grab:hover {
        transform: scale(1.1);
        color: #6366f1;
    }

    .cursor-grab:active {
        transform: scale(0.9);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

#main-content {
    margin-left: 250px;
    padding: 2rem;
}

/* Yönetim modalı için stiller */
.manage-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer; /* Tıklanabilir olduğunu belirtir */
    transition: background-color 0.2s ease-in-out;
}

    .manage-list-item:hover {
        background-color: #f1f5f9;
    }

/* Vurgulama animasyonu için stil */
.highlight-pulse {
    animation: highlight 1.5s ease-in-out;
}

/* Tost bildirimleri için özel animasyonlar */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Yeni, daha yumuşak ve zarif kaybolma animasyonu */
@keyframes fadeOutSoft {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    to {
        transform: translateY(-10px) scale(0.9);
        opacity: 0;
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Parçacık animasyonu */
@keyframes particleAnimation {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-70px) rotate(180deg) scale(1.5);
        opacity: 0;
    }
}

/* Ana konteynerin konumu ve stili */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1055;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 100%;
}

/* Tost bildiriminin genel stili */
.tn-toast-custom {
    width: 360px;
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: slideInUp 0.4s ease-out forwards;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

    .tn-toast-custom.tn-slide-out {
        /* Yeni, daha yumuşak kapanma animasyonu uygulandı */
        animation: fadeOutSoft 0.7s ease-in forwards;
    }

/* Başarı, hata, bilgi ve uyarı için gradyan ve metin renkleri */
.tn-toast-success {
    background-image: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: #fff;
}

.tn-toast-error {
    background-image: linear-gradient(135deg, #F44336, #FF5722);
    color: #fff;
}

.tn-toast-info {
    background-image: linear-gradient(135deg, #2196F3, #03A9F4);
    color: #fff;
}

.tn-toast-warning {
    background-image: linear-gradient(135deg, #FFC107, #FF9800);
    color: #212529;
}

/* İçerik düzeni */
.tn-toast-custom .tn-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: none;
    background-color: transparent;
    color: inherit;
}

    .tn-toast-custom .tn-toast-header .tn-title-group {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .tn-toast-custom .tn-toast-header strong {
        font-weight: 700;
        font-size: 1.125rem;
    }

.tn-toast-custom .tn-toast-body {
    font-size: 0.875rem;
    padding: 0;
    margin-top: 0.5rem;
}

.tn-toast-custom .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: opacity 0.2s;
    transform: scale(0.8);
}

    .tn-toast-custom .btn-close:hover {
        opacity: 1;
    }

/* İlerleme çubuğu */
.tn-toast-custom .tn-progress-bar {
    height: 4px;
    border-radius: 9999px;
    margin-top: 0.75rem;
    background-color: rgba(255, 255, 255, 0.3);
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.tn-toast-warning .tn-progress-bar {
    background-color: rgba(0, 0, 0, 0.2);
}

.tn-toast-custom .tn-progress-bar.animate {
    animation-name: progressBar;
}

.tn-toast-custom.tn-pause-animation .tn-progress-bar {
    animation-play-state: paused;
}

/* Buton stili */
.tn-action-button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .tn-action-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.06);
    }

/* Yeni parçacık konteyner ve parçacık stili */
.tn-toast-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.tn-particle {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: particleAnimation 3s infinite;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #e5e7eb;
    outline: none;
    border-radius: 2px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d9488;
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider-switch {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

    .slider-switch:before {
        position: absolute;
        content: "";
        height: 16px;
        width: 16px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider-switch {
    background-color: #0d9488;
}

    input:checked + .slider-switch:before {
        transform: translateX(20px);
    }

.hidden-element {
    display: none !important;
}

/* Özel scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 10px;
}

    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

/* Yükseklik ayarı */
.controls-container {
    height: calc(100vh - 200px);
    max-height: 600px;
    overflow-y: auto; /* Bu satırı ekleyin */
    overflow-x: hidden; /* Yatay scroll'u engelle */
}

@media (max-height: 700px) {
    .controls-container {
        height: 65vh;
    }
}}

/* Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease-in-out;
}

/* Kırpma stilleri */
.crop-container {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.crop-box {
    position: absolute;
    border: 2px solid #ff5722;
    background: rgba(255, 87, 34, 0.1);
    cursor: move;
    box-sizing: border-box;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

.crop-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #ff5722;
    border: 2px solid white;
    border-radius: 50%;
}

.handle-n {
    top: -8px;
    left: 50%;
    margin-left: -8px;
    cursor: n-resize;
}

.handle-ne {
    top: -8px;
    right: -8px;
    cursor: ne-resize;
}

.handle-e {
    top: 50%;
    right: -8px;
    margin-top: -8px;
    cursor: e-resize;
}

.handle-se {
    bottom: -8px;
    right: -8px;
    cursor: se-resize;
}

.handle-s {
    bottom: -8px;
    left: 50%;
    margin-left: -8px;
    cursor: s-resize;
}

.handle-sw {
    bottom: -8px;
    left: -8px;
    cursor: sw-resize;
}

.handle-w {
    top: 50%;
    left: -8px;
    margin-top: -8px;
    cursor: w-resize;
}

.handle-nw {
    top: -8px;
    left: -8px;
    cursor: nw-resize;
}

/* Kırpma kılavuz çizgileri */
.crop-guide {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
}

.guide-h {
    width: 100%;
    height: 1px;
    left: 0;
}

.guide-v {
    width: 1px;
    height: 100%;
    top: 0;
}

.crop-tool-focused {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
    border-color: #0d9488 !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* URL input alanı için ek stil */
#imageUrlInput {
    min-width: 0; /* Flexbox'ta sıkışma sorununu çözer */
}

#loadFromUrlBtn {
    flex-shrink: 0; /* Butonun küçülmesini engeller */
}

/* URL input alanı için stil */
#imageUrlInput:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}