/* =========================================================================
   Kart Detay - "Düzenleme Öner" modal + buton
   - Hem light hem dark theme; mevcut .theme-dark/.theme-light pattern'i.
   - Mobil önce (max-width 600 için ayrı override yok, layout flex/grid'le esnek).
   ========================================================================= */

/* ---- Trigger butonu (kart resmi köşesindeki kalem) ---- */
.card-suggest-edit-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.45);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.card-suggest-edit-btn:hover,
.card-suggest-edit-btn:focus-visible {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.55);
    outline: none;
    filter: brightness(1.05);
}

.card-suggest-edit-btn i {
    font-size: 1rem;
    line-height: 1;
}

/* ---- Modal overlay ---- */
.suggest-edit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 24, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1080;
    padding: 1rem;
    animation: suggestEditFade 0.18s ease both;
}

.suggest-edit-modal-overlay.is-open {
    display: flex;
}

@keyframes suggestEditFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- Modal kutusu ---- */
.suggest-edit-modal {
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border-radius: 14px;
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
}

.theme-dark .suggest-edit-modal {
    background: #1a1f2e;
    color: #e5e7eb;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.suggest-edit-modal__header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.theme-dark .suggest-edit-modal__header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.suggest-edit-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.suggest-edit-modal__title i {
    color: #d97706;
}

.suggest-edit-modal__close {
    border: none;
    background: transparent;
    color: inherit;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s ease;
}

.suggest-edit-modal__close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.theme-dark .suggest-edit-modal__close:hover {
    background: rgba(255, 255, 255, 0.08);
}

.suggest-edit-modal__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.suggest-edit-modal__hint {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #6b7280;
}

.theme-dark .suggest-edit-modal__hint {
    color: #9ca3af;
}

.suggest-edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.suggest-edit-field__label {
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: inherit;
}

.suggest-edit-field__label .badge-current {
    font-weight: 400;
    font-size: 0.75rem;
    color: #6b7280;
}

.theme-dark .suggest-edit-field__label .badge-current {
    color: #9ca3af;
}

.suggest-edit-field input[type="text"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff;
    color: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.suggest-edit-field input[type="text"]:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.theme-dark .suggest-edit-field input[type="text"] {
    background: #0f1422;
    border-color: rgba(255, 255, 255, 0.12);
}

/* ---- Resim alanı: dropzone tarzı ---- */
.suggest-edit-image-dropzone {
    border: 1.5px dashed rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    transition: border-color 0.18s ease, background 0.18s ease;
    cursor: pointer;
}

.suggest-edit-image-dropzone:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.06);
}

.theme-dark .suggest-edit-image-dropzone {
    background: #0f1422;
    border-color: rgba(255, 255, 255, 0.15);
    color: #9ca3af;
}

.suggest-edit-image-dropzone.has-preview {
    padding: 0.5rem;
    border-style: solid;
    background: transparent;
}

.suggest-edit-image-dropzone__icon {
    font-size: 1.6rem;
    color: #d97706;
    margin-bottom: 0.4rem;
}

.suggest-edit-image-dropzone__hint {
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
}

.suggest-edit-image-preview {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.suggest-edit-image-dropzone.has-preview .suggest-edit-image-preview {
    display: flex;
}

.suggest-edit-image-dropzone.has-preview .suggest-edit-image-dropzone__icon,
.suggest-edit-image-dropzone.has-preview .suggest-edit-image-dropzone__hint {
    display: none;
}

.suggest-edit-image-preview img {
    max-width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 8px;
}

.suggest-edit-image-preview__remove {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: inherit;
}

.theme-dark .suggest-edit-image-preview__remove {
    border-color: rgba(255, 255, 255, 0.18);
}

.suggest-edit-image-preview__remove:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: #dc2626;
    color: #dc2626;
}

/* ---- Footer ---- */
.suggest-edit-modal__footer {
    padding: 0.9rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.theme-dark .suggest-edit-modal__footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.suggest-edit-modal__footer .btn {
    min-width: 110px;
}

/* ---- Alert (inline) ---- */
.suggest-edit-alert {
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    line-height: 1.4;
    display: none;
}

.suggest-edit-alert.is-visible {
    display: block;
}

.suggest-edit-alert--error {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.theme-dark .suggest-edit-alert--error {
    background: rgba(220, 38, 38, 0.18);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.45);
}

.suggest-edit-alert--success {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.theme-dark .suggest-edit-alert--success {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.45);
}

/* ---- Mobil ufak iyileştirmeler ---- */
@media (max-width: 480px) {
    .suggest-edit-modal {
        border-radius: 12px;
    }

    .suggest-edit-modal__footer {
        flex-direction: column-reverse;
    }

    .suggest-edit-modal__footer .btn {
        width: 100%;
    }
}
