/* Task 4.26 — Public contact / başvuru formu */

:root {
    --ct-bg: #ffffff;
    --ct-surface: #f9fafb;
    --ct-text: #111827;
    --ct-muted: #6b7280;
    --ct-border: #e5e7eb;
    --ct-primary: #4f46e5;
    --ct-primary-dark: #4338ca;
    --ct-success: #10b981;
    --ct-error: #dc2626;
    --ct-radius: 12px;
}

.ct-section {
    padding: 60px 20px 80px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
    min-height: calc(100vh - 200px);
}

.ct-container {
    max-width: 720px;
    margin: 0 auto;
}

.ct-head {
    text-align: center;
    margin-bottom: 32px;
}

.ct-head__eyebrow {
    display: inline-block;
    padding: 4px 12px;
    background: #eef2ff;
    color: var(--ct-primary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.ct-head h1 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: var(--ct-text);
    line-height: 1.15;
}

.ct-head p {
    color: var(--ct-muted);
    font-size: 16px;
    margin: 0;
}

@media (max-width: 640px) {
    .ct-section { padding: 40px 16px 60px 16px; }
    .ct-head h1 { font-size: 28px; }
}

.ct-card {
    background: #fff;
    border: 1px solid var(--ct-border);
    border-radius: var(--ct-radius);
    padding: 32px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

@media (max-width: 640px) {
    .ct-card { padding: 22px; }
}

/* ---------- Form ---------- */
.ct-field { margin-bottom: 18px; }

.ct-field label {
    display: block;
    font-weight: 600;
    color: var(--ct-text);
    margin-bottom: 6px;
    font-size: 13px;
}

.ct-field label .req {
    color: var(--ct-error);
    margin-left: 2px;
}

.ct-field input[type="text"],
.ct-field input[type="email"],
.ct-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--ct-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--ct-text);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ct-field input:focus,
.ct-field textarea:focus {
    outline: 0;
    border-color: var(--ct-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.ct-field textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.5;
}

.ct-field__hint {
    color: var(--ct-muted);
    font-size: 12px;
    margin-top: 4px;
}

.ct-field__counter {
    text-align: right;
    color: var(--ct-muted);
    font-size: 12px;
    margin-top: 4px;
}

/* Honeypot — gizle (kullanıcı görmez, bot doldurur) */
.ct-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Buttons ---------- */
.ct-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.ct-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.ct-btn--primary {
    background: var(--ct-primary);
    color: #fff;
}

.ct-btn--primary:hover {
    background: var(--ct-primary-dark);
    color: #fff;
}

.ct-btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ct-btn--ghost {
    background: transparent;
    color: var(--ct-text);
    border-color: var(--ct-border);
}

.ct-btn--ghost:hover { background: var(--ct-surface); }

.ct-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ct-spin 0.7s linear infinite;
    display: none;
}

button.is-loading .ct-spinner { display: inline-block; }

@keyframes ct-spin { to { transform: rotate(360deg); } }

/* ---------- Alerts ---------- */
.ct-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ct-alert--success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.ct-alert--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ct-alert i { margin-top: 2px; flex-shrink: 0; }

/* ---------- Validation errors ---------- */
.ct-error {
    color: var(--ct-error);
    font-size: 12px;
    margin-top: 4px;
}

/* ---------- Side info (opsiyonel iletişim bilgisi) ---------- */
.ct-aside {
    margin-top: 24px;
    padding: 18px;
    background: var(--ct-surface);
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    color: var(--ct-muted);
    font-size: 13px;
    text-align: center;
}

.ct-aside a {
    color: var(--ct-primary);
    text-decoration: none;
    font-weight: 600;
}

.ct-aside a:hover { text-decoration: underline; }

/* ---------- Admin lead list (Areas/Admin/Views/Leads) ---------- */
/* =================================================================
   Admin Leads — modern dashboard pattern eklemeleri
   (eski .ct-lead-* class'lari geriye donuk uyumluluk icin korundu)
   ================================================================= */

/* Unread satir vurgusu — yeni mesaj satirlari */
.admin-lead-row--unread > td {
    background: linear-gradient(90deg, rgba(99, 102, 241, .04) 0%, transparent 100%);
}

.admin-lead-row--unread:hover > td {
    background: linear-gradient(90deg, rgba(99, 102, 241, .08) 0%, rgba(99, 102, 241, .02) 100%);
}

/* Unread dot — satir basinda nabiz indikatoru */
.admin-lead-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 0 8px rgba(99, 102, 241, .6);
    margin-right: 8px;
    vertical-align: middle;
    animation: admin-lead-pulse 2s ease-in-out infinite;
}

@keyframes admin-lead-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.85); }
}

/* Lead name link — unread'de kalin */
.admin-lead-name {
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.admin-lead-row--unread .admin-lead-name {
    font-weight: 700;
    color: #4f46e5;
}

.admin-lead-name:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Email link */
.admin-lead-email {
    color: #475569;
    text-decoration: none;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: .85rem;
}

.admin-lead-email:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Detail mesaj govdesi */
.admin-lead-message {
    padding: 18px 20px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-lead-message p {
    margin: 0;
}

/* User-Agent — uzun string, wrap */
.admin-lead-ua {
    word-break: break-all;
    font-size: .72rem;
    line-height: 1.4;
}

/* @media reduced motion */
@media (prefers-reduced-motion: reduce) {
    .admin-lead-dot {
        animation: none !important;
    }
}

/* =================================================================
   Eski ct-lead-card stilleri (legacy - dokunulmuyor)
   ================================================================= */

.ct-lead-card {
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.ct-lead-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid #f3f4f6;
}

.ct-lead-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.ct-lead-filter {
    display: inline-flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.ct-lead-filter a {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ct-muted);
    border-radius: 6px;
    text-decoration: none;
}

.ct-lead-filter a.active {
    background: #fff;
    color: var(--ct-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ct-lead-table {
    width: 100%;
    border-collapse: collapse;
}

.ct-lead-table th, .ct-lead-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
    font-size: 13px;
}

.ct-lead-table th {
    background: #f9fafb;
    color: var(--ct-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.ct-lead-table tr.is-unread { background: #f0f9ff; }
.ct-lead-table tr.is-unread td:first-child { font-weight: 700; }

.ct-lead-table a {
    color: var(--ct-text);
    text-decoration: none;
}

.ct-lead-table a:hover { color: var(--ct-primary); }

.ct-chip {
    display: inline-flex;
    padding: 2px 8px;
    background: #eef2ff;
    color: var(--ct-primary);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.ct-chip--unread {
    background: #fee2e2;
    color: #991b1b;
}

/* Detail */
.ct-detail-msg {
    background: var(--ct-surface);
    border-left: 3px solid var(--ct-primary);
    padding: 16px 18px;
    border-radius: 6px;
    white-space: pre-wrap;
    color: var(--ct-text);
    line-height: 1.6;
    font-size: 14px;
}

.ct-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.ct-meta-tile {
    background: var(--ct-surface);
    border: 1px solid var(--ct-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
}

.ct-meta-tile span {
    display: block;
    color: var(--ct-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 10px;
    margin-bottom: 3px;
}

.ct-meta-tile strong { color: var(--ct-text); word-break: break-all; }
