/* Custom styles for Corporate Headshot Generator */

:root {
    --transition-speed: 0.3s;
}

/* Smooth transitions */
* {
    transition: all var(--transition-speed) ease;
}

/* Custom card hover effects */
.card {
    border: 1px solid var(--bs-border-color);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* File input styling */
.form-control:focus {
    border-color: var(--bs-info);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-info-rgb), 0.25);
}

/* Custom button animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-info));
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--bs-success), #20c997);
}

/* Loading animation enhancements */
.spinner-border {
    animation: spinner-border 1s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Image preview styling */
#imagePreview img {
    border: 2px solid var(--bs-border-color);
    transition: border-color var(--transition-speed) ease;
}

#imagePreview:hover img {
    border-color: var(--bs-info);
}

/* Progress bar animation */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* Icon styling */
.display-4, .display-5, .display-6 {
    font-weight: 700;
}

/* Badge styling */
.badge {
    font-size: 0.875em;
    padding: 0.5rem 1rem;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-info);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .display-6 {
        font-size: 1.75rem;
    }
}

/* Loading state improvements */
#loadingState .progress {
    height: 8px;
}

#loadingState .progress-bar {
    background: linear-gradient(45deg, var(--bs-info), var(--bs-primary));
}

/* Form enhancements */
.form-select:focus {
    border-color: var(--bs-info);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-info-rgb), 0.25);
}

/* Image result styling */
.card-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bs-border-radius);
}

/* Tips section styling */
.list-unstyled li {
    padding: 0.25rem 0;
}

.bi-check-circle {
    font-size: 1.1em;
}

/* Success animations */
@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.bi-check-circle-fill {
    animation: checkmark 0.6s ease-out;
}

/* Button group spacing */
.row.g-3 > * {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .row.g-3 > * {
        margin-bottom: 0;
    }
}

/* reCAPTCHA v3 badge styling for dark UI */
.grecaptcha-badge {
    left: 12px !important;   /* move off the primary CTA */
    right: auto !important;
    bottom: 12px !important;
    border-radius: 10px;
    box-shadow: none !important;
    opacity: .9;
    transform: scale(.92);
    transform-origin: bottom left;
}

@media (max-width: 480px) {
    .grecaptcha-badge { 
        transform: scale(.86); 
        bottom: 8px; 
        left: 8px; 
    }
}

/* Before/After Image Comparison Component */
.ba-wrapper {
    position: relative;
    max-width: 400px;
    height: 400px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: grab;
    user-select: none;
}

.ba-wrapper:active {
    cursor: grabbing;
}

.ba-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.ba-slider {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: #00d4ff;
    z-index: 10;
    cursor: ew-resize;
}

.ba-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #00d4ff;
    border: 3px solid white;
    border-radius: 50%;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
    transition: all 0.2s ease;
}

.ba-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.6);
}

.ba-handle i {
    font-size: 8px;
    margin: 0 -1px;
}

/* Responsive adjustments for before/after component */
@media (max-width: 768px) {
    .ba-wrapper {
        max-width: 300px;
        height: 300px;
    }
    
    .ba-handle {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .ba-wrapper {
        max-width: 280px;
        height: 280px;
    }
    
    .ba-handle {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }
    
    .ba-handle i {
        font-size: 7px;
    }
}
