/**
 * TC Kimlik Modal — Ortak component
 * Domain register akışında (.tr / .com.tr) TRABIS için TC kimlik alır
 * Kullanım: window.TcKimlikModal.prompt(domain, onSuccess)
 */

.tc-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: tcFadeIn 0.2s ease;
}

.tc-modal-overlay.active { display: flex; }

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

.tc-modal {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    animation: tcSlideUp 0.25s ease;
}

@keyframes tcSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.tc-modal-header {
    background: linear-gradient(135deg, #F97316 0%, #ea580c 100%);
    color: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tc-modal-header .tc-modal-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.tc-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

.tc-modal-header h3 small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 2px;
}

.tc-modal-body {
    padding: 24px;
}

.tc-modal-domain {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #9a3412;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tc-modal-domain strong {
    color: #7c2d12;
    font-weight: 600;
}

.tc-modal-body p {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.tc-input-wrap {
    position: relative;
    margin-bottom: 10px;
}

.tc-input {
    width: 100%;
    padding: 13px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    color: #1f2937;
    transition: border-color 0.2s;
    font-family: 'Courier New', monospace;
}

.tc-input:focus {
    outline: none;
    border-color: #F97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.tc-input.is-invalid {
    border-color: #dc2626;
    background: #fef2f2;
}

.tc-input.is-valid {
    border-color: #16a34a;
    background: #f0fdf4;
}

.tc-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 6px;
}

.tc-error.active { display: flex; }

.tc-hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #6b7280;
    font-size: 12px;
    margin-top: 12px;
    line-height: 1.5;
}

.tc-hint i { color: #F97316; margin-top: 2px; }

.tc-modal-footer {
    padding: 16px 24px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.tc-btn {
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tc-btn-cancel {
    background: #fff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.tc-btn-cancel:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.tc-btn-primary {
    background: linear-gradient(135deg, #F97316 0%, #ea580c 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.tc-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.tc-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.tc-btn .fa-spinner { margin-right: 4px; }

@media (max-width: 576px) {
    .tc-modal { max-width: 100%; border-radius: 14px; }
    .tc-modal-header { padding: 16px 18px; }
    .tc-modal-body { padding: 18px; }
    .tc-modal-footer { flex-direction: column-reverse; padding: 14px 18px; }
    .tc-btn { width: 100%; justify-content: center; }
    .tc-input { font-size: 16px; padding: 11px 12px; }
}
