/*
 * TMC Photo Crop — Resim kırpma modal stilleri
 * Cropper.js ile çalışır, Android/iOS uyumludur.
 */

/* ── Upload Alanı ─────────────────────────────── */
.tmc-upload-alan {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.tmc-upload-tetikleyici {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px dashed rgba(255,255,255,0.2);
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.tmc-upload-tetikleyici:hover { border-color: var(--color1, #9b0000); }

.tmc-upload-tetikleyici img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.tmc-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 50%;
}
.tmc-upload-tetikleyici:hover .tmc-upload-overlay { opacity: 1; }

.tmc-upload-overlay i { font-size: 22px; color: #fff; }
.tmc-upload-overlay span { font-size: 11px; color: #ddd; font-weight: 600; }

/* Gizli file input */
.tmc-upload-alan input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.tmc-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--color1, #9b0000);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s;
    outline: none;
    user-select: none;
}
.tmc-upload-btn:hover { opacity: 0.85; }
.tmc-upload-btn i { font-size: 14px; }

.tmc-upload-onizleme-ad {
    font-size: 12px;
    color: #aaa;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* ── Modal Overlay ────────────────────────────── */
#tmc-crop-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.tmc-crop-kutu {
    background: #1a2035;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

/* Başlık */
.tmc-crop-baslik {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}
.tmc-crop-baslik span {
    font-size: 15px;
    font-weight: 700;
    color: #eee;
}
.tmc-crop-kapat-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #ccc;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    outline: none;
}
.tmc-crop-kapat-btn:hover { background: #c0392b; color: #fff; }

/* Crop alanı */
.tmc-crop-alan {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #0d1120;
    position: relative;
    /* Cropper.js için max yükseklik */
    max-height: 400px;
}
.tmc-crop-alan img {
    display: block;
    max-width: 100%;
}

/* Bilgi çubuğu */
.tmc-crop-bilgi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: rgba(0,0,0,0.3);
    flex-shrink: 0;
    gap: 10px;
}
.tmc-crop-boyut-info {
    font-size: 12px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tmc-crop-boyut-info i { color: var(--color1, #9b0000); }

/* Zoom kontrol */
.tmc-crop-zoom {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tmc-crop-zoom button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #ccc;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: background 0.15s;
}
.tmc-crop-zoom button:hover { background: rgba(255,255,255,0.18); }

/* Aksiyonlar */
.tmc-crop-aksiyonlar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.tmc-crop-iptal {
    padding: 9px 20px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #ccc;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    outline: none;
}
.tmc-crop-iptal:hover { background: rgba(255,255,255,0.14); }

.tmc-crop-kaydet {
    padding: 9px 22px;
    border-radius: 8px;
    background: var(--color1, #9b0000);
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: opacity 0.15s;
    outline: none;
}
.tmc-crop-kaydet:hover { opacity: 0.85; }
.tmc-crop-kaydet i { font-size: 14px; }

/* Kırpma uyarısı */
.tmc-crop-uyari {
    font-size: 11px;
    color: #ffa726;
    padding: 0 20px 8px;
    display: none;
}
.tmc-crop-uyari.goster { display: block; }

/* Mobil */
@media (max-width: 540px) {
    .tmc-crop-kutu { border-radius: 12px; max-height: calc(100vh - 20px); }
    .tmc-crop-alan { max-height: 280px; }
    .tmc-crop-aksiyonlar { padding: 12px 14px; }
    .tmc-crop-baslik { padding: 12px 16px; }
    .tmc-crop-bilgi { padding: 6px 14px; }
}
