/**
 * Solid Medya — Hatıra Defteri (masaüstü)
 */
:root {
    --sm-hatira-gold: #ffbc00;
    --sm-hatira-gold-soft: #ffd54f;
    --sm-hatira-muted: rgba(255, 255, 255, 0.48);
}

/* ── Sade ikon butonu ── */
.sm-hatira-trigger {
    position: fixed;
    top: 16px;
    left: 22px;
    z-index: var(--header-z-actions, 9999);
    display: none;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(14, 14, 14, 0.78);
    color: var(--sm-hatira-gold);
    font-size: 0.82rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sm-hatira-trigger:hover {
    transform: translateY(-1px);
    background: rgba(22, 22, 22, 0.9);
    color: var(--sm-hatira-gold-soft);
}

.sm-hatira-trigger:active {
    transform: scale(0.96);
}

.sm-hatira-trigger:focus-visible {
    outline: 2px solid var(--sm-hatira-gold);
    outline-offset: 3px;
}

@media (min-width: 992px) {
    .sm-hatira-trigger {
        display: inline-flex;
    }
}

/* ── Modal ── */
.sm-hatira-modal {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.sm-hatira-modal[hidden] {
    display: none !important;
}

.sm-hatira-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.74);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: smHatiraFadeIn 0.26s ease;
}

.sm-hatira-modal__panel {
    position: relative;
    width: min(580px, calc(100vw - 32px));
    max-height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(165deg, #181818 0%, #101010 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
    animation: smHatiraPanelIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.sm-hatira-modal__panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sm-hatira-gold) 30%, var(--sm-hatira-gold-soft) 50%, var(--sm-hatira-gold) 70%, transparent);
    opacity: 0.8;
    pointer-events: none;
}

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

@keyframes smHatiraPanelIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Başlık ── */
.sm-hatira-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sm-hatira-modal__head h2 {
    margin: 0 0 6px;
    font-family: var(--sm-font-display, 'League Spartan', system-ui, sans-serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.sm-hatira-modal__subtitle {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--sm-hatira-muted);
}

.sm-hatira-modal__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.sm-hatira-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ── Yorum listesi ── */
.sm-hatira-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 188, 0, 0.4) transparent;
}

.sm-hatira-modal__body::-webkit-scrollbar {
    width: 6px;
}

.sm-hatira-modal__body::-webkit-scrollbar-thumb {
    background: rgba(255, 188, 0, 0.45);
    border-radius: 999px;
}

.sm-hatira-comments {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sm-hatira-comment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.sm-hatira-comment__avatar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 188, 0, 0.12);
    border: 1px solid rgba(255, 188, 0, 0.22);
    color: var(--sm-hatira-gold-soft);
    font-size: 0.82rem;
}

.sm-hatira-comment__bubble {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px 14px 14px 4px;
}

.sm-hatira-comment__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.58;
    color: rgba(255, 255, 255, 0.9);
}

/* ── Alt bölüm ── */
.sm-hatira-modal__foot {
    padding: 12px 20px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.sm-hatira-compose {
    display: grid;
    gap: 0;
}

.sm-hatira-compose--open {
    gap: 10px;
}

.sm-hatira-compose__input {
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: var(--sm-hatira-gold);
    background: rgba(20, 20, 20, 0.92) !important;
    border: 1px solid rgba(255, 188, 0, 0.32) !important;
    border-radius: 12px;
    outline: none;
    color-scheme: dark;
    visibility: hidden;
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    overflow: hidden;
    transform: translateY(4px);
    transition:
        visibility 0s linear 0.22s,
        max-height 0.26s ease,
        transform 0.22s ease,
        padding 0.22s ease,
        border-width 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease;
}

.sm-hatira-compose--open .sm-hatira-compose__input {
    visibility: visible;
    max-height: 80px;
    padding: 12px 14px;
    border-width: 1px;
    transform: translateY(0);
    transition:
        visibility 0s linear 0s,
        max-height 0.26s ease,
        transform 0.22s ease,
        padding 0.22s ease,
        border-width 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease;
}

.sm-hatira-compose__input::placeholder {
    color: rgba(255, 255, 255, 0.45);
    opacity: 1;
}

.sm-hatira-compose__input:focus {
    background: rgba(28, 24, 14, 0.98) !important;
    border-color: rgba(255, 188, 0, 0.58) !important;
    box-shadow: 0 0 0 3px rgba(255, 188, 0, 0.16);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.sm-hatira-compose__input:-webkit-autofill,
.sm-hatira-compose__input:-webkit-autofill:hover,
.sm-hatira-compose__input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 20, 20, 0.92) inset !important;
    box-shadow: 0 0 0 1000px rgba(20, 20, 20, 0.92) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: var(--sm-hatira-gold);
    border: 1px solid rgba(255, 188, 0, 0.32) !important;
}

.sm-hatira-compose__input[hidden] {
    display: block !important;
}

.sm-hatira-compose__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    padding: 0 18px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    color: #141414;
    background: linear-gradient(135deg, #ffd54f, #ffbc00);
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 188, 0, 0.2);
    transition: transform 0.16s ease, filter 0.16s ease;
}

.sm-hatira-compose__btn:hover {
    filter: brightness(1.05);
}

.sm-hatira-compose__btn:active {
    transform: scale(0.985);
}

.sm-hatira-compose__feedback {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 188, 0, 0.1);
    border: 1px solid rgba(255, 188, 0, 0.2);
    border-radius: 10px;
}

.sm-hatira-compose__feedback::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 188, 0, 0.22);
    color: var(--sm-hatira-gold-soft);
    font-size: 0.68rem;
    font-weight: 800;
}

.sm-hatira-compose__feedback[hidden] {
    display: none !important;
}

body.sm-hatira-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .sm-hatira-modal__backdrop,
    .sm-hatira-modal__panel,
    .sm-hatira-compose__input {
        animation: none;
        transition: none;
    }
}
