/* 
 * SMARTADM FORM STYLERİ - TAM CSS KODU
 * Bu stil dosyası SmartADM üyelik formunun tüm görünümünü kontrol eder
 * Mobil uyumlu, responsive ve modern tasarım
 */

/* ===== TEMEL KART STYLERİ ===== */
/* Ana form konteyneri - beyaz kart görünümü */
.smartadm-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e5e7eb;
}

/* ===== FORM HEADER STYLERİ ===== */
/* Formun üst kısmı - gradient arkaplanlı başlık alanı */
.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 20px 15px 20px;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Logo konteyneri - logo için şeffaf arkaplan */
.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border-radius: 12px;
    margin-bottom: 3px;
}

/* Logo resmi - orjinal renklerde görünür */
.header-icon .site-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

/* Fallback ikon (logo yoksa gözüken) */
.header-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Başlık yazısı - "Üyelik Kaydı" */
.form-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    line-height: 1.2;
    letter-spacing: 0.5px;
}

/* ===== FORM BODY STYLERİ ===== */
/* Form içeriği alanı */
.form-body {
    padding: 18px 15px;
}

/* Form satırları - input'ları yan yana dizmek için */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

/* Her form grubu (label + input) */
.form-group {
    margin-bottom: 16px;
}

/* Input label'ları */
.form-label {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

/* Label yanındaki emoji ikonları */
.label-icon {
    margin-right: 6px;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

/* Tüm input alanları */
.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    min-height: 48px;
    background: #ffffff;
    color: #374151;
}

/* Input focus (odaklandığında) efekti */
.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* Date input için mobil uyumluluk */
.form-input[type="date"] {
    min-height: 48px;
}

/* Input altındaki açıklama yazıları */
.form-note {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.3;
    font-style: italic;
}

/* Zorunlu alan yıldız işareti */
.required {
    color: #ef4444;
    margin-left: 2px;
}

/* ===== CHECKBOX BÖLÜMÜ STYLERİ ===== */
/* İzinler ve onaylar bölümü */
.checkbox-section {
    margin: 18px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

/* Bölüm başlığı */
.section-title {
    margin: 0 0 10px 0;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Başlık öncesi emoji */
.section-title::before {
    content: '📋';
    font-size: 16px;
}

/* Checkbox'ların konteyneri */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Her bir checkbox öğesi */
.checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Checkbox hover efekti */
.checkbox-item:hover {
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Checkbox input'u */
.checkbox-item input[type="checkbox"] {
    margin-top: 2px;
    transform: scale(1.1);
    min-width: 16px;
    min-height: 16px;
    accent-color: #667eea;
}

/* Checkbox label'ı */
.checkbox-item label {
    flex: 1;
    cursor: pointer;
    line-height: 1.4;
}

/* Checkbox başlık yazısı */
.checkbox-title {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 3px;
    font-size: 14px;
    line-height: 1.3;
}

/* Checkbox açıklama yazısı */
.checkbox-desc {
    display: block;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}

/* ===== GÖNDER BUTONU STYLERİ ===== */
/* Ana gönder butonu */
#submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 50px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

/* Buton üzerinde kayma efekti */
#submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

/* Hover durumunda kayma efekti */
#submit-btn:hover::before {
    left: 100%;
}

/* Buton hover efekti */
#submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Buton tıklama efekti */
#submit-btn:active {
    transform: translateY(-1px);
}

/* Buton disabled durumu */
#submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Buton metni */
.btn-text {
    font-weight: 700;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

/* Buton ikonu */
.btn-icon {
    font-size: 15px;
    position: relative;
    z-index: 1;
}

/* ===== FORM FOOTER STYLERİ ===== */
/* Form alt bilgi alanı */
.form-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
}

/* ===== MESAJ STYLERİ ===== */
/* Hata mesajı kutusu */
.error-message {
    background: #fef2f2;
    border: 2px solid #fecaca;
    color: #dc2626;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    text-align: center;
}

/* Başarı mesajı kutusu */
.success-message {
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    color: #16a34a;
    padding: 18px 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

/* ===== YÜKLENİYOR STYLERİ ===== */
/* Yükleniyor animasyonu konteyneri */
.loading {
    text-align: center;
    margin: 16px 0;
    display: none;
}

/* Dönen yükleniyor çemberi */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto 8px;
}

/* Dönme animasyonu */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Yükleniyor yazısı */
.loading p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
}

/* ===== RESPONSIVE TASARIM ===== */

/* Tablet için responsive (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .smartadm-card {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .form-body {
        padding: 20px 18px;
    }
    
    .form-header {
        padding: 25px 20px 18px 20px;
    }
    
    .form-header h2 {
        font-size: 17px;
    }
    
    .form-row {
        flex-direction: row;
        gap: 12px;
    }
    
    .form-row .form-group {
        flex: 1;
    }
}

/* Masaüstü için responsive (769px ve üstü) */
@media (min-width: 769px) {
    .smartadm-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .form-body {
        padding: 22px 20px;
    }
    
    .form-header {
        padding: 28px 20px 20px 20px;
    }
    
    .form-header h2 {
        font-size: 17px;
    }
    
    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

/* Çok küçük ekranlar için (iPhone SE gibi - 360px ve altı) */
@media (max-width: 360px) {
    .form-body {
        padding: 12px 10px;
    }
    
    .form-header {
        padding: 15px 15px 12px 15px;
    }
    
    .header-icon {
        width: 45px;
        height: 45px;
    }
    
    .header-icon .site-logo {
        width: 40px;
        height: 40px;
    }
    
    .form-header h2 {
        font-size: 15px;
        letter-spacing: 0.3px;
    }
    
    .checkbox-section {
        padding: 12px;
        margin: 12px 0;
    }
    
    .section-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    #submit-btn {
        padding: 12px 16px;
        min-height: 46px;
        font-size: 14px;
    }
    
    .form-input {
        padding: 10px 12px;
        min-height: 44px;
    }
}

/* Yatay mod için optimizasyon (500px yükseklik ve altı) */
@media (max-height: 500px) and (orientation: landscape) {
    .smartadm-card {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-header {
        padding: 12px 15px 10px 15px;
    }
    
    .form-header h2 {
        font-size: 15px;
    }
    
    .form-body {
        padding: 12px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .checkbox-section {
        margin: 10px 0;
        padding: 12px;
    }
}

/* Yüksek çözünürlüklü ekranlar için (Retina display) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .smartadm-card {
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    }
}

/* ===== KARANLIK MOD DESTEĞİ ===== */
@media (prefers-color-scheme: dark) {
    .smartadm-card {
        background: #1f2937;
        color: #f9fafb;
        border-color: #374151;
    }
    
    .form-label {
        color: #f9fafb;
    }
    
    .form-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-input:focus {
        border-color: #667eea;
        background: #374151;
    }
    
    .checkbox-section {
        background: #4b5563;
        border-color: #6b7280;
    }
    
    .checkbox-item {
        background: #374151;
        border-color: #6b7280;
    }
    
    .checkbox-title {
        color: #ffffff;
        font-weight: 600;
    }
    
    .checkbox-desc {
        color: #e5e7eb;
        font-weight: 400;
    }
    
    .section-title {
        color: #ffffff;
    }
    
    .form-footer {
        border-color: #374151;
        color: #d1d5db;
    }
    
    .error-message {
        background: #7f1d1d;
        border-color: #991b1b;
        color: #fca5a5;
    }
    
    .success-message {
        background: #064e3b;
        border-color: #065f46;
        color: #34d399;
    }
}

/* ===== OTP POPUP STYLERİ ===== */
/* OTP popup arkaplanı */
#otp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

/* OTP popup kutusu */
#otp-popup {
    background: white;
    padding: 20px 18px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    max-width: 380px;
    width: 100%;
    text-align: center;
    animation: popupFadeIn 0.3s ease-out;
    position: relative;
    border: 1px solid #e5e7eb;
}

/* Popup açılış animasyonu */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* OTP popup başlığı */
#otp-popup h3 {
    margin: 0 0 10px 0;
    color: #374151;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

/* OTP bilgi metni */
#otp-info-text {
    margin: 0 0 16px 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.3;
}

/* OTP mesaj kutusu */
#otp-message {
    margin: 10px 0;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    display: none;
    animation: messageSlideIn 0.3s ease-out;
}

/* Mesaj kutusu animasyonu */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Başarı mesajı stili */
#otp-message.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 2px solid #bbf7d0;
}

/* Hata mesajı stili */
#otp-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #fecaca;
}

/* OTP kodu input'u */
#otp-code-input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 6px;
    margin: 10px 0 16px 0;
    transition: all 0.3s ease;
    font-weight: 700;
    color: #374151;
    background: #fafafa;
    min-height: 50px;
    box-sizing: border-box;
}

/* OTP input focus efekti */
#otp-code-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: white;
    transform: translateY(-1px);
}

/* OTP input disabled durumu */
#otp-code-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* OTP butonları konteyneri */
.otp-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* OTP butonları (tekrar gönder ve iptal) */
#resend-otp-btn, #cancel-otp-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    width: 100%;
}

/* Tekrar gönder butonu */
#resend-otp-btn {
    background: #6b7280;
    color: white;
}

/* Tekrar gönder butonu hover */
#resend-otp-btn:hover:not(:disabled) {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(107, 114, 128, 0.3);
}

/* Tekrar gönder butonu disabled */
#resend-otp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* İptal butonu */
#cancel-otp-btn {
    background: #ef4444;
    color: white;
}

/* İptal butonu hover */
#cancel-otp-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
}

/* Responsive OTP Popup (480px ve altı) */
@media (max-width: 480px) {
    #otp-popup-overlay {
        padding: 12px;
    }
    
    #otp-popup {
        padding: 18px 15px;
        margin: 0;
    }
    
    #otp-popup h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    #otp-info-text {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    #otp-code-input {
        font-size: 15px;
        padding: 12px;
        min-height: 46px;
        letter-spacing: 4px;
        margin: 8px 0 12px 0;
    }
    
    #resend-otp-btn, #cancel-otp-btn {
        padding: 10px 14px;
        min-height: 42px;
        font-size: 13px;
    }
}

/* Karanlık mod için OTP Popup */
@media (prefers-color-scheme: dark) {
    #otp-popup {
        background: #1f2937;
        color: #f9fafb;
        border-color: #374151;
    }
    
    #otp-popup h3 {
        color: #f9fafb;
    }
    
    #otp-info-text {
        color: #d1d5db;
    }
    
    #otp-code-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    #otp-code-input:focus {
        border-color: #667eea;
        background: #374151;
    }
    
    #otp-message.success {
        background: #064e3b;
        color: #34d399;
        border-color: #065f46;
    }
    
    #otp-message.error {
        background: #7f1d1d;
        color: #fca5a5;
        border-color: #991b1b;
    }
}

/* ===== ERİŞİLEBİLİRLİK STYLERİ ===== */
/* Klavye navigasyonu için focus stilleri */
.form-input:focus-visible,
#submit-btn:focus-visible,
#otp-code-input:focus-visible,
#resend-otp-btn:focus-visible,
#cancel-otp-btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Checkbox focus stili */
.checkbox-item:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 6px;
}

/* ===== MOBİL OPTİMİZASYONLARI ===== */
/* iOS input stil düzeltmeleri */
.form-input {
    -webkit-tap-highlight-color: transparent;
}

.form-input:focus {
    -webkit-tap-highlight-color: transparent;
}

/* Mobil tarayıcılar için otomatik zoom'u engelleme */
@media (max-width: 480px) {
    .form-input {
        font-size: 16px;
    }
    
    select.form-input {
        font-size: 16px;
    }
}

/* Color picker için (admin panelinde kullanılır) */
.color-field {
    width: 100px !important;
}