@import url('https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');

.dnd-upload-status {
    margin-top: 20px;
}

.dnd-custom-upload-image {
    margin-left: auto;
    margin-right: auto;
    max-height: 250px;
}

.dnd-custom-upload-image img {
    width: auto !important;
    margin-left: auto;
    margin-right: auto;
    max-height: 250px;
}

.dnd-custom-upload-status {
    flex-direction: row;
    width: 100%;
}

.dnd-upload-details {
    width: 85%;
}

.dnd-upload-details span.file-name {
    max-width: 200px;
}

.decrease-btn,
.increase-btn {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 16px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.decrease-btn:hover,
.increase-btn:hover {
    background-color: #e0e0e0;
}

input[type="number"] {
    text-align: center;
}

.checkered {
    max-height: 240px;
    background: -webkit-linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), -webkit-linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), white;
    background: -moz-linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), -moz-linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), white;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), linear-gradient(45deg, rgba(0, 0, 0, 0.0980392) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.0980392) 75%, rgba(0, 0, 0, 0.0980392) 0), white;
    background-repeat: repeat, repeat;
    background-position: 0px 0, 5px 5px;
    -webkit-transform-origin: 0 0 0;
    transform-origin: 0 0 0;
    -webkit-background-origin: padding-box, padding-box;
    background-origin: padding-box, padding-box;
    -webkit-background-clip: border-box, border-box;
    background-clip: border-box, border-box;
    -webkit-background-size: 10px 10px, 10px 10px;
    background-size: 10px 10px, 10px 10px;
    -webkit-box-shadow: none;
    box-shadow: none;
    text-shadow: none;
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    transition: none;
    -webkit-transform: scaleX(1) scaleY(1) scaleZ(1);
    transform: scaleX(1) scaleY(1) scaleZ(1);
}

/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 47px;
    height: 21px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 15px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:focus+.slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.dnd-image-wrapper {
    min-height: 300px;
    max-height: 300px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
    overflow-anchor: none;
    background: #f8f8f8;
    padding-top: 20px;
    max-width: 250px;
    min-width: 250px;
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    background-color: #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dnd-image-wrapper dnd-custom-upload-image.checkered {
    margin: auto;
    display: block;

    max-height: 250px;
    max-width: 100%;

    object-fit: contain;
}

.dnd-custom-upload-image {
    transition: transform 0.3s ease-in-out;
    display: inline-block;
}

.dnd-custom-upload-image.rotated {}

.dnd-custom-upload-image.rotated img {
    transform: rotate(90deg);
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
}

.dnd-custom-upload-image.rotated>div[style*="top: -20px"],
.dnd-custom-upload-image.rotated>div[style*="left: -20px"] {
    display: none;
}

.image-action-btn.rotate-image-btn.active {
    background: #2c7be5;
    color: white;
    border-color: #2c7be5;
}

/* === LIGHTBOX & ZOOM ICON STYLES START === */

/* Lightbox Overlay */
.dtf-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 20px;
    box-sizing: border-box;
}

/* Lightbox Content Area */
.dtf-lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    cursor: default;
}

/* Lightbox Image */
.dtf-lightbox-content img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

/* Lightbox Close Button */
.dtf-lightbox-close {
    position: absolute;
    top: -35px;
    right: -5px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease;
}

.dtf-lightbox-close:hover {
    transform: scale(1.1);
}

/* Zoom Icon on Image Preview */
.dnd-image-wrapper .zoom-icon {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6) url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="white"><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>') center/16px no-repeat;
    border-radius: 50%;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dnd-image-wrapper:hover .zoom-icon {
    opacity: 1;
}

.dnd-image-wrapper .zoom-icon:hover {
    background-color: #0073aa;
}

.dnd-image-wrapper .final-preview-image {
    cursor: pointer;
}

/* === LIGHTBOX & ZOOM ICON STYLES END === */


/* === HOVER ZOOM EFFECT START === */

/* Görselin yumuşak bir şekilde büyüyüp küçülmesi için geçiş efekti ekliyoruz. */
/* Bu kural, .final-preview-image sınıfına sahip tüm resimlere uygulanır. */
.dnd-image-wrapper .final-preview-image {
    transition: transform 0.3s ease-in-out;
}

/* Fare, görselin ana sarmalayıcısının (.dnd-image-wrapper) üzerine geldiğinde, */
/* içindeki resmi (.final-preview-image) %20 oranında büyütüyoruz. */
/* .dnd-image-wrapper'da overflow:hidden olduğu için resim taşıp bozmayacaktır. */
.dnd-image-wrapper:hover .final-preview-image {
    transform: scale(1.2);
}

/* === HOVER ZOOM EFFECT END === */

/* === KALİTE GÖSTERGESİ BAŞLANGIÇ === */
.dtf-quality-indicator {
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid #e0e4e9;
    border-radius: 5px;
    background-color: #f8f9fa;
    display: none;
    /* JS ile gösterilecek */
    text-align: left;
}

.dtf-quality-indicator strong {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-right: 8px;
    vertical-align: middle;
}

.dtf-quality-indicator .quality-bar {
    display: inline-flex;
    gap: 3px;
    vertical-align: middle;
    margin-right: 8px;
}

.dtf-quality-indicator .bar-segment {
    width: 20px;
    height: 8px;
    background-color: #e0e4e9;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.dtf-quality-indicator .quality-text {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    vertical-align: middle;
}

/* Kalite Seviyeleri */
.dtf-quality-indicator.good .bar-segment:nth-child(-n+3) {
    background-color: #28a745;
}

.dtf-quality-indicator.good .quality-text {
    color: #28a745;
}

.dtf-quality-indicator.ok .bar-segment:nth-child(-n+2) {
    background-color: #ffc107;
}

.dtf-quality-indicator.ok .quality-text {
    color: #b98900;
}

.dtf-quality-indicator.poor .bar-segment:nth-child(-n+1) {
    background-color: #dc3545;
}

.dtf-quality-indicator.poor .quality-text {
    color: #dc3545;
}

/* === KALİTE GÖSTERGESİ SON === */

/* DEĞİŞİKLİK: Mobil medya sorgusu dosyanın sonuna taşındı. */
@media screen and (max-width: 767px) {
    .dnd-custom-upload-image {
        width: auto !important;
        margin-left: auto;
        margin-right: auto;
    }

    .dnd-image-wrapper {
        width: 90%;
        min-width: auto !important;
    }

    .dnd-custom-upload-image img {
        max-height: 250px;
        margin-left: auto;
        margin-right: auto;
    }

    .dnd-custom-upload-status {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px;
    }

    .dnd-upload-status {
        width: 100% !important;
    }

    .dnd-upload-details {
        width: 85% !important;
        font-size: 12px;
    }

    input[type="number"] {
        width: 100%;
    }

    .dnd-image-wrapper .zoom-icon {
        opacity: 1;
    }
}