/* ============================================================
   360° Sanal Tur — Upload Widget Stilleri  v2.0
   ============================================================ */

:root {
    --tur-gold:        #e0a000;
    --tur-gold-dark:   #c47f00;
    --tur-gold-light:  #fff8e1;
    --tur-gold-border: #f0d060;
    --tur-green:       #27ae60;
    --tur-red:         #e74c3c;
    --tur-radius:      12px;
    --tur-shadow:      0 2px 12px rgba(0,0,0,0.08);
}

.tur360-upload-wrapper {
    margin: 20px 0 28px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 100%;
}

/* ── Header ─────────────────────────────────────────────── */
.tur360-upload-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tur-gold-border);
}

.tur360-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    background: var(--tur-gold-light);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tur360-upload-header > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.4;
}

.tur360-upload-header > div strong {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.tur360-subtitle {
    margin: 0;
    font-size: 12px;
    color: #777;
}

.tur360-subtitle strong {
    color: var(--tur-gold);
    font-weight: 600;
}

/* ── Drop Zone ───────────────────────────────────────────── */
.tur360-drop-zone {
    border: 2px dashed var(--tur-gold-border);
    border-radius: var(--tur-radius);
    padding: 32px 20px 26px;
    text-align: center;
    background: linear-gradient(135deg, #fffdf5 0%, #fffbee 100%);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.tur360-drop-zone:hover {
    background: var(--tur-gold-light);
    border-color: var(--tur-gold);
    box-shadow: 0 0 0 4px rgba(224,160,0,0.08);
}

.tur360-drop-zone.tur360-drag-over {
    background: #fff3cc;
    border-color: var(--tur-gold-dark);
    box-shadow: 0 0 0 5px rgba(224,160,0,0.15);
}

.tur360-drop-zone.tur360-maxed {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #ccc;
    background: #f9f9f9;
    box-shadow: none;
}

.tur360-drop-icon {
    font-size: 38px;
    display: block;
    margin-bottom: 10px;
    color: #d0c080;
    line-height: 1;
}

.tur360-drop-text {
    margin: 0 0 14px;
    color: #777;
    font-size: 14px;
}

.tur360-browse-btn {
    display: inline-block;
    background: var(--tur-gold);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(224,160,0,0.35);
}

.tur360-browse-btn:hover  {
    background: var(--tur-gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(224,160,0,0.45);
}
.tur360-browse-btn:active { transform: translateY(0); box-shadow: none; }

.tur360-file-info {
    margin: 12px 0 0;
    font-size: 11px;
    color: #bbb;
    letter-spacing: 0.2px;
}

/* ── Global Progress Bar ─────────────────────────────────── */
.tur360-progress-bar-wrap {
    margin: 10px 0 0;
    height: 4px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.tur360-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--tur-gold), #f5c842);
    border-radius: 4px;
    transition: width 0.2s ease;
}

/* ── Sayaç ───────────────────────────────────────────────── */
.tur360-counter {
    margin: 12px 0 3px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tur360-upload-wrapper.tur360-min-reached .tur360-counter { color: var(--tur-green); }

.tur360-min-label {
    font-size: 11px;
    color: #aaa;
    font-weight: 400;
    font-style: italic;
}
.tur360-upload-wrapper.tur360-min-reached .tur360-min-label { display: none; }

/* ── Min Uyarı Bandı ─────────────────────────────────────── */
.tur360-min-notice {
    display: none;
    margin: 4px 0 8px;
    padding: 7px 12px;
    background: #fffbe6;
    border-left: 3px solid var(--tur-gold);
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: #7a5500;
}

/* ── Mesajlar ────────────────────────────────────────────── */
.tur360-message {
    font-size: 12px;
    min-height: 18px;
    padding: 2px 0;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.tur360-msg-ok   { color: var(--tur-green); }
.tur360-msg-err  { color: var(--tur-red); font-weight: 600; }
.tur360-msg-info { color: #999; }

/* ── Thumbnail Grid ──────────────────────────────────────── */
.tur360-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.tur360-thumb-item {
    position: relative;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: var(--tur-shadow);
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
    cursor: default;
}

.tur360-thumb-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
    transform: translateY(-3px);
    border-color: #d8d8d8;
}

/* ── Kare Görsel ─────────────────────────────────────────── */
.tur360-thumb-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f0f0f0;
}

.tur360-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.tur360-thumb-item:hover img { transform: scale(1.04); }

.tur360-thumb-icon {
    font-size: 26px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

/* ── Yükleniyor Overlay ──────────────────────────────────── */
.tur360-thumb-uploading {
    position: absolute;
    inset: 0;
    background: rgba(15,15,15,0.52);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 2;
    backdrop-filter: blur(1px);
    transition: background 0.3s;
}

.tur360-thumb-uploading.tur360-done {
    background: rgba(22,140,60,0.78);
}

.tur360-spinner {
    width: 26px;
    height: 26px;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tur360spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes tur360spin {
    to { transform: rotate(360deg); }
}

.tur360-thumb-pct {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.tur360-checkmark {
    font-size: 28px;
    color: #fff;
    line-height: 1;
    animation: tur360pop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes tur360pop {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ── Mini Progress Bar ───────────────────────────────────── */
.tur360-thumb-bar-wrap {
    height: 3px;
    background: #efefef;
    overflow: hidden;
}

.tur360-thumb-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--tur-gold), #f5c842);
    transition: width 0.18s ease;
}

.tur360-thumb-bar.tur360-bar-done {
    background: var(--tur-green);
    width: 100% !important;
}

/* ── Thumbnail Bilgi ─────────────────────────────────────── */
.tur360-thumb-info {
    padding: 5px 6px 6px;
}

.tur360-thumb-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #444;
    font-size: 10px;
    font-weight: 500;
    max-width: 100%;
}

.tur360-thumb-size {
    color: #b0b0b0;
    display: block;
    font-size: 9.5px;
    margin-top: 1px;
}

/* ── Silme Butonu ────────────────────────────────────────── */
.tur360-thumb-del {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    background: rgba(231,76,60,0.9);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
    line-height: 18px;
    padding: 0;
    text-align: center;
    display: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.22);
    transition: background 0.15s, transform 0.1s;
    z-index: 3;
}

.tur360-thumb-del:hover {
    background: var(--tur-red);
    transform: scale(1.12);
}

.tur360-thumb-item:hover .tur360-thumb-del { display: block; }

/* ── Sepet Butonu Devre Dışı ─────────────────────────────── */
.single_add_to_cart_button.tur360-disabled,
.single_add_to_cart_button[disabled] {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ── Mobil ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    .tur360-upload-header > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .tur360-subtitle   { white-space: normal; font-size: 11px; }
    .tur360-thumbs     { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
    .tur360-browse-btn { padding: 9px 20px; font-size: 12px; }
}

/* ── Bekleme Modu (sıradaki dosyalar) ───────────────────────
   Aktif yüklenmeyi bekleyen thumb'lar: overlay daha soluk,
   spinner yerine nabız (pulse) animasyonu gösterir           */
.tur360-thumb-uploading.tur360-waiting {
    background: rgba(15,15,15,0.38);
}

.tur360-thumb-uploading.tur360-waiting .tur360-spinner {
    border-top-color: rgba(255,255,255,0.5);
    animation: tur360pulse 1.4s ease-in-out infinite;
    border-color: rgba(255,255,255,0.18);
    border-top-color: rgba(255,255,255,0.5);
}

@keyframes tur360pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50%       { opacity: 1;   transform: scale(1);    }
}

.tur360-thumb-uploading.tur360-waiting .tur360-thumb-pct {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.7;
    content: 'Sırada';
}

/* Sıra yazısı — pct yerine "Sırada" göster */
.tur360-thumb-uploading.tur360-waiting .tur360-thumb-pct::before {
    content: 'Sırada';
}
.tur360-thumb-uploading.tur360-waiting .tur360-thumb-pct {
    font-size: 0;  /* gerçek metni gizle */
}
.tur360-thumb-uploading.tur360-waiting .tur360-thumb-pct::before {
    font-size: 10px;
}

/* Mini bar bekleme rengi */
.tur360-thumb-uploading.tur360-waiting ~ * .tur360-thumb-bar,
.tur360-thumb-item:has(.tur360-waiting) .tur360-thumb-bar {
    background: #ddd;
    width: 100% !important;
    animation: tur360shimmer 1.6s ease-in-out infinite;
}

@keyframes tur360shimmer {
    0%   { opacity: 0.3; }
    50%  { opacity: 0.7; }
    100% { opacity: 0.3; }
}
