/* ════════════════════════════════════════════════════════════════════
   MTA A3.8 — Mesajlaşma + Anlaşma Belgesi Stilleri
   v7.34.10.35-A3.8
   ════════════════════════════════════════════════════════════════════ */

/* ─── /mesaj/{id} sayfası ─── */
.mta-mesaj-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
    background: #f3f4f6;
    overflow: hidden;
}
.mta-mesaj-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #427584, #5a9ab0);
    color: #fff;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 10;
}
.mta-mesaj-back {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 4px;
}
.mta-mesaj-header-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}
.mta-mesaj-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
}
.mta-mesaj-header-name {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mta-mesaj-agr-btn {
    background: #fef3c7;
    color: #78350f;
    text-decoration: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border: 2px solid #fcd34d;
    flex-shrink: 0;
}

/* MESAJ FEED */
.mta-mesaj-feed {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mta-mesaj-loading,
.mta-mesaj-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 14px;
}
.mta-mesaj-empty small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
}

/* BUBBLE */
.mta-mesaj-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 16px;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.mta-mesaj-bubble.is-mine {
    align-self: flex-end;
    background: #427584;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.mta-mesaj-bubble.is-other {
    align-self: flex-start;
    background: #fff;
    color: #1f2937;
    border-bottom-left-radius: 4px;
}
.mta-mesaj-body {
    font-size: 14px;
    line-height: 1.5;
}
.mta-mesaj-time {
    font-size: 10px;
    opacity: 0.75;
    margin-top: 4px;
    text-align: right;
}

/* ANLAŞMA MADDESİ (özel) */
.mta-mesaj-bubble.is-clause {
    border: 2px solid #fbbf24;
    background: #fef3c7;
    color: #78350f;
    max-width: 90%;
}
.mta-mesaj-bubble.is-clause.is-mine {
    background: #fde68a;
    color: #78350f;
}
.mta-mesaj-bubble.is-clause.clause-accepted {
    border-color: #10b981;
    background: #d1fae5;
    color: #065f46;
}
.mta-mesaj-bubble.is-clause.clause-rejected {
    border-color: #f87171;
    background: #fee2e2;
    color: #991b1b;
    opacity: 0.85;
}
.mta-mesaj-clause-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.mta-mc-type {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.mta-mc-status {
    font-size: 11px;
    font-weight: 700;
}
.mta-mc-status.is-pending { color: #92400e; }
.mta-mc-status.is-accepted { color: #065f46; }
.mta-mc-status.is-rejected { color: #991b1b; }
.mta-mc-actions {
    display: flex;
    gap: 6px;
    margin: 8px 0 4px;
}
.mta-mc-btn {
    flex: 1;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}
.mta-mc-btn.is-accept { background: #10b981; color: #fff; }
.mta-mc-btn.is-accept:hover { background: #059669; }
.mta-mc-btn.is-reject { background: #f87171; color: #fff; }
.mta-mc-btn.is-reject:hover { background: #dc2626; }

/* COMPOSE */
.mta-mesaj-compose {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 10px 12px 14px;
}
.mta-mesaj-clause-toggle {
    margin-bottom: 8px;
}
.mta-mesaj-clause-toggle label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    cursor: pointer;
}
.mta-mesaj-clause-toggle input {
    accent-color: #f59e0b;
}
.mta-mesaj-clause-type {
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #fef3c7;
    color: #78350f;
    width: auto;
}
.mta-mesaj-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.mta-mesaj-input {
    flex: 1;
    border: 1.5px solid #d1d5db;
    border-radius: 18px;
    padding: 10px 14px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    min-height: 40px;
    max-height: 120px;
}
.mta-mesaj-input:focus {
    border-color: #427584;
}
.mta-mesaj-send-btn {
    background: linear-gradient(135deg, #427584, #5a9ab0);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(66, 117, 132, 0.3);
}
.mta-mesaj-send-btn:hover { background: linear-gradient(135deg, #2c5160, #427584); }
.mta-mesaj-send-btn:disabled { opacity: 0.6; cursor: wait; }
.mta-mesaj-help {
    font-size: 10px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.4;
}

/* ─── Hesabım > Mesajlarım (thread liste) ─── */
.mta-thread-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mta-thread-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}
.mta-thread-item:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-color: #427584;
}
.mta-thread-item.has-unread {
    background: #eff6ff;
    border-color: #93c5fd;
}
.mta-thread-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.mta-thread-content {
    flex: 1;
    min-width: 0;
}
.mta-thread-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}
.mta-thread-name {
    font-weight: 700;
    font-size: 14px;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mta-thread-time {
    font-size: 10px;
    color: #9ca3af;
    flex-shrink: 0;
}
.mta-thread-preview {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.mta-thread-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.mta-thread-unread {
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}
.mta-thread-agr-badge {
    background: #fef3c7;
    color: #78350f;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #fcd34d;
    font-weight: 700;
}
.mta-thread-empty {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
}

/* Mesaj At butonu (profil sayfasında) */
.mta-mesaj-at-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #427584, #5a9ab0);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
.mta-mesaj-at-btn:hover { background: linear-gradient(135deg, #2c5160, #427584); color: #fff; }

@media (prefers-color-scheme: dark) {
    .mta-mesaj-page,
    .mta-mesaj-feed { background: #111827; }
    .mta-mesaj-bubble.is-other { background: #1f2937; color: #f9fafb; }
    .mta-mesaj-compose { background: #1f2937; border-color: #374151; }
    .mta-mesaj-input { background: #111827; color: #f9fafb; border-color: #374151; }
    .mta-thread-item { background: #1f2937; border-color: #374151; }
    .mta-thread-name { color: #f9fafb; }
}

/* A4 FIX7 — Mesajlarım empty state büyük + CTA */
.mta-thread-empty-big {
    text-align: center;
    padding: 50px 24px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}
.mta-thread-empty-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.85;
}
.mta-thread-empty-title {
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 6px;
}
.mta-thread-empty-sub {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 18px;
}
.mta-thread-empty-cta {
    display: inline-block;
    background: linear-gradient(135deg, #427584, #5a9ab0);
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
}
.mta-thread-empty-cta:hover {
    background: linear-gradient(135deg, #2c5160, #427584);
    color: #fff;
}
