/* Custom styles for Business Card Scanner */

/* Ensure full background coverage on mobile */
html, body {
    height: 100%;
    min-height: 100vh;
    background-color: #1a1a1a;
}

.container {
    min-height: 100vh;
    background-color: #1a1a1a;
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* Force install prompt styling */
#installPrompt {
    background-color: #555 !important;
    border-color: #666 !important;
    color: #fff !important;
}

/* iOS-specific optimizations */
@supports (-webkit-touch-callout: none) {
    .btn {
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    .form-control {
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* Force background for iOS Safari */
    html, body {
        background-color: #1a1a1a !important;
        min-height: 100vh !important;
        -webkit-background-size: cover;
        background-size: cover;
    }
    
    .container {
        background-color: #1a1a1a !important;
        min-height: 100vh !important;
        max-width: 800px !important;
        margin: 0 auto !important;
    }
    
    /* iOS Safari notification fix */
    #installPrompt {
        background-color: #555 !important;
        border: 1px solid #666 !important;
        color: #fff !important;
    }
    
    /* Force card styling for iOS Safari */
    .card {
        background-color: #2a2a2a !important;
        border: 1px solid #444 !important;
        color: #fff !important;
    }
    
    .card-body {
        background-color: #2a2a2a !important;
        color: #fff !important;
    }
}

/* Image preview styling */
#imagePreview {
    text-align: center;
}

#previewImg {
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* QR Code styling */
#qrCodeImg {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Loading animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
}

/* Button spacing */
.btn {
    margin: 0.25rem;
}

/* Icon spacing in labels */
.form-label i {
    width: 16px;
    text-align: center;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .display-5 {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
    }
}

/* Error state styling */
.alert {
    border: none;
    border-radius: 8px;
}

/* Custom file upload styling */
.form-control[type="file"] {
    padding: 0.5rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background-color: var(--bs-secondary);
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin-right: 1rem;
    color: var(--bs-body-color);
}

/* iPhone-specific styling */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .card {
        border-radius: 12px;
    }
    
    .btn {
        border-radius: 8px;
        font-weight: 500;
    }
}

/* iPhone device specific enhancements */
.iphone-device .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.iphone-device .btn-success:hover {
    background: linear-gradient(135deg, #218838, #1fa67a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.iphone-device #qrCodeSection {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1), rgba(32, 201, 151, 0.1));
    border: 2px solid rgba(40, 167, 69, 0.2);
}

/* Modal styling for vCard preview */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* vCard preview styling */
pre {
    background-color: var(--bs-gray-100) !important;
    color: var(--bs-gray-800) !important;
    border: 1px solid var(--bs-gray-300);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Contact form styling */
#contactInfoForm .row .col-md-6:nth-child(odd) {
    padding-right: 0.75rem;
}

#contactInfoForm .row .col-md-6:nth-child(even) {
    padding-left: 0.75rem;
}

/* Success animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* QR Code section styling */
#qrCodeSection {
    background: linear-gradient(135deg, rgba(var(--bs-info-rgb), 0.1), rgba(var(--bs-primary-rgb), 0.1));
}

/* How it works section */
.display-1 {
    font-size: 3rem;
}

@media (max-width: 768px) {
    .display-1 {
        font-size: 2rem;
    }
}
