/* Telkin — toast ve uygulama içi onay diyalogları */

.telkin-toast-stack {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.telkin-toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 0.65rem;
    padding: 0.8rem 0.85rem;
    border-radius: var(--radius-lg, 12px);
    font-size: 0.875rem;
    line-height: 1.45;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    border: 1px solid transparent;
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.telkin-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.telkin-toast.is-leaving {
    opacity: 0;
    transform: translateX(12px);
}

.telkin-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.telkin-toast-body {
    min-width: 0;
}

.telkin-toast-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
    opacity: 0.9;
}

.telkin-toast-text {
    margin: 0;
    font-weight: 500;
}

.telkin-toast-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.telkin-toast-list li {
    position: relative;
    padding-left: 0.85rem;
    font-weight: 500;
}

.telkin-toast-list li + li {
    margin-top: 0.35rem;
}

.telkin-toast-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}

.telkin-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    margin: -0.15rem -0.1rem 0 0;
    border: none;
    border-radius: var(--radius-sm, 6px);
    background: transparent;
    color: inherit;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.telkin-toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.telkin-toast-success {
    background: #064e3b;
    color: #d1fae5;
    border-color: rgba(16, 185, 129, 0.45);
}

.telkin-toast-success .telkin-toast-icon {
    background: rgba(16, 185, 129, 0.22);
    color: #6ee7b7;
}

.telkin-toast-error {
    background: #7f1d1d;
    color: #fee2e2;
    border-color: rgba(239, 68, 68, 0.5);
}

.telkin-toast-error .telkin-toast-icon {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.telkin-toast-warning {
    background: #78350f;
    color: #fef3c7;
    border-color: rgba(245, 158, 11, 0.5);
}

.telkin-toast-warning .telkin-toast-icon {
    background: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.telkin-toast-info {
    background: #1e3a8a;
    color: #dbeafe;
    border-color: rgba(59, 130, 246, 0.45);
}

.telkin-toast-info .telkin-toast-icon {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

.light-theme .telkin-toast-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #6ee7b7;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.12);
}

.light-theme .telkin-toast-success .telkin-toast-icon {
    background: #a7f3d0;
    color: #047857;
}

.light-theme .telkin-toast-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.12);
}

.light-theme .telkin-toast-error .telkin-toast-icon {
    background: #fecaca;
    color: #b91c1c;
}

.light-theme .telkin-toast-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fcd34d;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.12);
}

.light-theme .telkin-toast-warning .telkin-toast-icon {
    background: #fde68a;
    color: #b45309;
}

.light-theme .telkin-toast-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #93c5fd;
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.12);
}

.light-theme .telkin-toast-info .telkin-toast-icon {
    background: #bfdbfe;
    color: #1d4ed8;
}

.light-theme .telkin-toast-close:hover {
    background: rgba(15, 23, 42, 0.06);
}

@media (max-width: 640px) {
    .telkin-toast-stack {
        left: max(0.75rem, env(safe-area-inset-left, 0px));
        right: max(0.75rem, env(safe-area-inset-right, 0px));
        width: auto;
    }
}

.telkin-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(10, 14, 23, 0.82);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.telkin-dialog-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.telkin-dialog {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
    transform: scale(0.96) translateY(12px);
    transition: transform 0.22s ease;
    overflow: hidden;
}

.telkin-dialog-overlay.is-open .telkin-dialog {
    transform: scale(1) translateY(0);
}

.telkin-dialog-header {
    padding: 1rem 1.25rem 0.5rem;
}

.telkin-dialog-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.telkin-dialog-body {
    padding: 0.5rem 1.25rem 1rem;
}

.telkin-dialog-message {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.telkin-dialog-input {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.88rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 2.75rem;
}

.telkin-dialog-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.15);
}

.telkin-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    padding: 0.85rem 1.25rem 1.15rem;
    border-top: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.15);
}

.telkin-dialog-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.telkin-dialog-btn-cancel {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.telkin-dialog-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
}

.telkin-dialog-btn-confirm {
    background: linear-gradient(135deg, var(--accent-primary), #e65c00);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.telkin-dialog-btn-confirm:hover {
    transform: translateY(-1px);
}

.telkin-dialog-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.light-theme .telkin-dialog-actions {
    background: #f1f5f9;
}

.light-theme .telkin-dialog-btn-cancel {
    background: #fff;
    border-color: #cbd5e1;
    color: #334155;
}

.light-theme .telkin-dialog-btn-cancel:hover {
    background: #f8fafc;
}
