/* Business Card Scanner Frontend Styles */
.bcs-app-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    overflow-x: hidden;
}

.bcs-header {
    background: linear-gradient(135deg, #006699 0%, #bd1b44 100%);
    color: white;
    padding: 20px;
    padding-top: env(safe-area-inset-top, 20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.bcs-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
}

.bcs-header h1 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 1;
    margin: 0;
}

.bcs-brand-subtitle {
    text-align: center;
    font-size: 14px;
    opacity: 0.9;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.bcs-main-content {
    padding: 20px;
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

.bcs-camera-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 102, 153, 0.1);
}

.bcs-camera-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.bcs-camera-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.bcs-primary-camera-btn {
    background: linear-gradient(135deg, #006699 0%, #0080bb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 102, 153, 0.3);
}

.bcs-primary-camera-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 102, 153, 0.4);
    transform: translateY(-1px);
    color: white;
}

.bcs-secondary-camera-btn {
    background: #f0f0f2;
    color: #7f7f7f;
    border: 2px solid #e0e0e2;
}

.bcs-secondary-camera-btn:hover {
    background: #e8e8ea;
    color: #7f7f7f;
    text-decoration: none;
}

.bcs-camera-btn:active {
    transform: scale(0.95);
}

.bcs-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bcs-camera-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: none;
}

.bcs-camera-container video {
    width: 100%;
    border-radius: 12px;
    background: #000;
}

.bcs-camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.bcs-camera-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 60%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
}

.bcs-camera-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
}

.bcs-capture-btn {
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 70px;
    background: white;
    border: 5px solid #bd1b44;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(189, 27, 68, 0.3);
}

.bcs-capture-btn:active {
    transform: translateX(-50%) scale(0.9);
}

.bcs-capture-btn:focus {
    outline: 2px solid #bd1b44;
    outline-offset: 2px;
}

.bcs-capture-btn::before {
    content: '';
    width: 50px;
    height: 50px;
    background: #bd1b44;
    border-radius: 50%;
}

.bcs-preview-section {
    display: none;
    margin-bottom: 20px;
    text-align: center;
}

.bcs-preview-image {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bcs-loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.bcs-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #006699;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: bcs-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes bcs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bcs-form-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.bcs-form-group {
    margin-bottom: 20px;
}

.bcs-form-group:last-child {
    margin-bottom: 0;
}

.bcs-input-with-voice {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.bcs-input-with-voice input,
.bcs-input-with-voice textarea {
    flex: 1;
}

.bcs-voice-btn {
    width: 48px;
    height: 48px;
    border: 2px solid #f0f0f2;
    background: white;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bcs-voice-btn:hover {
    background: #f8f8fa;
    border-color: #006699;
}

.bcs-voice-btn:active {
    transform: scale(0.95);
}

.bcs-voice-btn:focus {
    outline: 2px solid #006699;
    outline-offset: 2px;
}

.bcs-voice-btn.recording {
    background: #bd1b44;
    border-color: #bd1b44;
    color: white;
    animation: bcs-pulse 1.5s infinite;
}

@keyframes bcs-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(189, 27, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(189, 27, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(189, 27, 68, 0);
    }
}

.bcs-input-with-voice textarea {
    min-height: 48px;
    resize: vertical;
}

textarea#bcsComments {
    min-height: 100px;
}

.bcs-form-group label {
    display: block;
    color: #7f7f7f;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bcs-form-section input[type="text"],
.bcs-form-section input[type="email"],
.bcs-form-section input[type="tel"],
.bcs-form-section textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #f0f0f2;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f8fa;
    -webkit-appearance: none;
}

.bcs-form-section input[type="text"]:focus,
.bcs-form-section input[type="email"]:focus,
.bcs-form-section input[type="tel"]:focus,
.bcs-form-section textarea:focus {
    outline: none;
    border-color: #006699;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 102, 153, 0.1);
}

.bcs-form-section textarea {
    min-height: 80px;
    resize: vertical;
}

.bcs-button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.bcs-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bcs-btn:active {
    transform: scale(0.95);
}

.bcs-btn:focus {
    outline: 2px solid #006699;
    outline-offset: 2px;
}

.bcs-save-btn {
    background: linear-gradient(135deg, #bd1b44 0%, #d42850 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(189, 27, 68, 0.3);
}

.bcs-save-btn:hover {
    box-shadow: 0 6px 20px rgba(189, 27, 68, 0.4);
    transform: translateY(-1px);
}

.bcs-clear-btn {
    background: #f0f0f2;
    color: #7f7f7f;
    border: 2px solid #e0e0e2;
}

.bcs-clear-btn:hover {
    background: #e8e8ea;
}

.bcs-extracted-text {
    background: #f8f8fa;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    display: none;
}

.bcs-extracted-text h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.bcs-extracted-text pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 12px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', monospace;
}

.bcs-success-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #006699 0%, #0080bb 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 102, 153, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
    font-weight: 600;
}

.bcs-success-toast.show {
    transform: translateX(-50%) translateY(0);
}

.bcs-error-message {
    background: #ffe6e6;
    border: 1px solid #ff9999;
    color: #cc0000;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bcs-main-content {
        padding: 15px;
    }
    
    .bcs-camera-section,
    .bcs-form-section {
        padding: 15px;
    }
    
    .bcs-camera-controls {
        flex-direction: column;
    }
    
    .bcs-camera-btn {
        font-size: 14px;
        padding: 12px;
    }
    
    .bcs-button-group {
        flex-direction: column;
    }
}

@media (max-width: 375px) {
    .bcs-header h1 {
        font-size: 20px;
    }
    
    .bcs-brand-subtitle {
        font-size: 12px;
    }
    
    .bcs-form-section input[type="text"],
    .bcs-form-section input[type="email"],
    .bcs-form-section input[type="tel"],
    .bcs-form-section textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
} 