/**
 * QRCodeg Generator Styles
 * Sol Form - Sağ Mobil Önizleme
 * Yeni Kartvizit Tasarımı
 */

:root {
    --qrcodeg-primary: #2563eb;
    --qrcodeg-primary-hover: #1d4ed8;
    --qrcodeg-success: #10b981;
    --qrcodeg-error: #ef4444;
    --qrcodeg-bg: #f8fafc;
    --qrcodeg-white: #ffffff;
    --qrcodeg-border: #e2e8f0;
    --qrcodeg-text: #1e293b;
    --qrcodeg-text-light: #64748b;
    --qrcodeg-radius: 12px;
    --qrcodeg-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --qrcodeg-shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.15);
    
    /* Kartvizit tema rengi - JS ile değiştirilecek */
    --vcard-theme: #0891b2;
    --vcard-theme-dark: #0e7490;
    --vcard-theme-light: #22d3ee;
}

/* ==========================================
   Main Container
   ========================================== */
.qrcodeg-generator {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.qrcodeg-generator * {
    box-sizing: border-box;
}

/* Limit Notice */
.qrcodeg-limit-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: var(--qrcodeg-radius);
    margin-bottom: 1.5rem;
    border: 1px solid #fcd34d;
}

.qrcodeg-limit-icon { font-size: 1.25rem; }
.qrcodeg-limit-text { font-size: 0.9rem; color: #92400e; }
.qrcodeg-limit-text strong { color: #78350f; font-weight: 700; }

.qrcodeg-limit-notice.limit-reached {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #f87171;
}

/* ==========================================
   Main Layout
   ========================================== */
.qrcodeg-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 960px) {
    .qrcodeg-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Form Section
   ========================================== */
.qrcodeg-form-section {
    background: var(--qrcodeg-white);
    border-radius: var(--qrcodeg-radius);
    padding: 1.5rem;
    box-shadow: var(--qrcodeg-shadow);
}

.qrcodeg-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--qrcodeg-text);
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--qrcodeg-bg);
}

.qrcodeg-section-title:first-child {
    margin-top: 0;
}

.section-icon {
    font-size: 1.1rem;
}

.qrcodeg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 500px) {
    .qrcodeg-form-row { grid-template-columns: 1fr; }
}

.qrcodeg-form-group {
    margin-bottom: 0.75rem;
}

.qrcodeg-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--qrcodeg-text);
    margin-bottom: 0.25rem;
}

.qrcodeg-form-group label .required {
    color: var(--qrcodeg-error);
}

.qrcodeg-form-group input,
.qrcodeg-form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid var(--qrcodeg-border);
    border-radius: 6px;
    background: var(--qrcodeg-white);
    color: var(--qrcodeg-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qrcodeg-form-group input:focus,
.qrcodeg-form-group textarea:focus {
    outline: none;
    border-color: var(--qrcodeg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.qrcodeg-form-group input::placeholder,
.qrcodeg-form-group textarea::placeholder {
    color: #94a3b8;
    font-size: 0.85rem;
}

.qrcodeg-form-group input[type="color"] {
    padding: 0.25rem;
    height: 38px;
    cursor: pointer;
}

.qrcodeg-form-group textarea {
    resize: vertical;
    min-height: 50px;
}

/* Submit Button */
.qrcodeg-submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--qrcodeg-white);
    background: linear-gradient(135deg, var(--qrcodeg-primary), #3b82f6);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.qrcodeg-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.qrcodeg-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* ==========================================
   Preview Section - Telefon Mockup
   ========================================== */
.qrcodeg-preview-section {
    position: relative;
}

.qrcodeg-preview-sticky {
    position: sticky;
    top: 1rem;
}

.qrcodeg-preview-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--qrcodeg-text);
    margin: 0 0 1rem;
    text-align: center;
}

/* Telefon Mockup */
.phone-mockup {
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.35),
        inset 0 0 0 2px #333;
    max-width: 320px;
    margin: 0 auto;
}

.phone-notch {
    width: 100px;
    height: 24px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
    margin: 0 auto -12px;
    position: relative;
    z-index: 10;
}

.phone-screen {
    background: #f5f5f5;
    border-radius: 28px;
    overflow: hidden;
    height: 580px;
    overflow-y: auto;
}

.phone-screen::-webkit-scrollbar {
    width: 0;
}

/* ==========================================
   vCard Preview - YENİ TASARIM
   ========================================== */
.vcard-preview {
    min-height: 100%;
    background: #f8fafc;
}

/* Header */
.vcard-header {
    position: relative;
    padding: 50px 20px 25px;
    text-align: center;
    color: white;
    overflow: hidden;
}

.vcard-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--vcard-theme) 0%, var(--vcard-theme-dark) 100%);
}

.vcard-header-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.vcard-header-content {
    position: relative;
    z-index: 1;
}

.vcard-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 3px solid rgba(255,255,255,0.3);
    overflow: hidden;
}

.vcard-avatar #avatar-initials {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.vcard-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.vcard-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.vcard-title-line {
    font-size: 13px;
    opacity: 0.9;
    margin: 0 0 4px;
}

.title-divider {
    margin: 0 6px;
    opacity: 0.6;
}

.vcard-company {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    opacity: 0.95;
}

/* Quick Actions */
.vcard-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.vcard-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: var(--vcard-theme);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcard-action-btn svg {
    width: 22px;
    height: 22px;
}

.vcard-action-btn:hover {
    background: var(--vcard-theme);
    color: white;
    transform: scale(1.05);
}

.vcard-action-btn.whatsapp {
    background: #25D366;
    color: white;
}

.vcard-action-btn.whatsapp:hover {
    background: #128C7E;
}

/* Content Cards */
.vcard-content {
    padding: 15px;
}

.vcard-card {
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.vcard-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
    font-weight: 600;
    color: var(--qrcodeg-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-icon {
    font-size: 14px;
}

.vcard-card-body {
    padding: 8px 14px;
}

.vcard-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    gap: 10px;
}

.vcard-item:last-child {
    border-bottom: none;
}

.vcard-item .item-label {
    font-size: 11px;
    color: var(--qrcodeg-text-light);
    text-transform: uppercase;
    font-weight: 500;
    flex-shrink: 0;
}

.vcard-item .item-value {
    font-size: 13px;
    color: var(--qrcodeg-text);
    text-align: right;
    word-break: break-word;
}

.vcard-item .iban-value {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.vcard-item.address-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.vcard-item.address-item .item-value {
    text-align: left;
    font-size: 12px;
    line-height: 1.4;
}

/* Social Media */
.vcard-social {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.2s;
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

.social-btn:hover {
    transform: scale(1.1);
}

.social-btn.linkedin { background: #0077B5; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn.twitter { background: #000; }

/* Footer */
.vcard-footer {
    padding: 15px;
}

.vcard-save-btn {
    width: 100%;
    padding: 14px;
    background: var(--vcard-theme);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.vcard-save-btn svg {
    width: 20px;
    height: 20px;
}

.vcard-save-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ==========================================
   CTA Box
   ========================================== */
.qrcodeg-cta-box {
    margin-top: 1.25rem;
    padding: 1rem;
    background: white;
    border-radius: var(--qrcodeg-radius);
    box-shadow: var(--qrcodeg-shadow);
    text-align: center;
}

.qrcodeg-cta-box h4 {
    font-size: 0.95rem;
    margin: 0 0 0.75rem;
}

.qrcodeg-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.qrcodeg-cta-features li {
    font-size: 0.75rem;
    color: var(--qrcodeg-text-light);
    background: var(--qrcodeg-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.qrcodeg-cta-btn {
    display: block;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--qrcodeg-success), #059669);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.qrcodeg-cta-btn:hover {
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* ==========================================
   Modal
   ========================================== */
.qrcodeg-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.qrcodeg-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.qrcodeg-modal-content {
    position: relative;
    background: white;
    border-radius: var(--qrcodeg-radius);
    padding: 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
}

.qrcodeg-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--qrcodeg-bg);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
}

.qrcodeg-modal-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.qrcodeg-modal-content h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }
.qrcodeg-modal-content p { font-size: 0.9rem; color: var(--qrcodeg-text-light); margin: 0 0 1.25rem; }

.qrcodeg-modal-buttons { display: flex; flex-direction: column; gap: 0.6rem; }

.qrcodeg-btn-primary {
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--qrcodeg-primary), #3b82f6);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.qrcodeg-btn-secondary {
    padding: 0.65rem;
    color: var(--qrcodeg-text-light);
    border: 1px solid var(--qrcodeg-border);
    border-radius: 8px;
    text-decoration: none;
}

/* Error Message */
.qrcodeg-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 960px) {
    .qrcodeg-preview-section {
        order: -1;
    }
    
    .qrcodeg-preview-sticky {
        position: relative;
        top: 0;
    }
    
    .phone-mockup {
        max-width: 280px;
    }
    
    .phone-screen {
        height: 500px;
    }
}
