/* Custom styles for AI Influencer Maker */

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Wizard Onboarding Styles */
.wizard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.wizard-progress {
    margin-bottom: 3rem;
}

a.wizard-step {
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
    color: #212529 !important;
    display: block;
}

a.wizard-step:hover {
    opacity: 0.8;
    transform: translateY(-2px);
    text-decoration: none !important;
    color: #212529 !important;
}

a.wizard-step:visited {
    color: #212529 !important;
}

a.wizard-step.active,
a.wizard-step.completed {
    opacity: 1;
}

a.wizard-step.active:hover,
a.wizard-step.completed:hover {
    opacity: 1;
    transform: translateY(-2px);
}

a.wizard-step .step-title {
    color: #212529 !important;
}

a.wizard-step .step-desc {
    color: #6c757d !important;
}

a.wizard-step .step-icon,
.wizard-step .step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.5rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

a.wizard-step.active .step-icon,
.wizard-step.active .step-icon {
    background: #0d6efd;
    color: white !important;
    transform: scale(1.1);
}

a.wizard-step.completed .step-icon,
.wizard-step.completed .step-icon {
    background: #198754;
    color: white !important;
}

a.wizard-step .step-title,
.wizard-step .step-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

a.wizard-step .step-desc,
.wizard-step .step-desc {
    font-size: 0.75rem;
    color: #6c757d;
}

.wizard-panel {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mood Board Styles */
.mood-board-container {
    min-height: 300px;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.mood-board-container:hover {
    border-color: #0d6efd;
    background: #f8f9ff;
}

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-zone:hover {
    background: rgba(13, 110, 253, 0.05);
}

.mood-board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.mood-board-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.mood-board-item:hover {
    transform: scale(1.05);
}

.mood-board-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mood-board-item .remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mood-board-item:hover .remove-btn {
    opacity: 1;
}

/* Archetype Cards */
.archetype-card {
    padding: 2rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.archetype-card:hover {
    border-color: #0d6efd;
    background: #f8f9ff;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.archetype-card.selected {
    border-color: #0d6efd;
    background: #e7f1ff;
}

.archetype-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: #0d6efd;
}

.archetype-card:hover .archetype-icon {
    background: #0d6efd;
    color: white;
}

/* Generated Images Grid */
.generated-image-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.generated-image-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.generated-image-item.selected {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25);
}

.generated-image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.generated-image-item .selection-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #198754;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.generated-image-item.selected .selection-badge {
    display: flex;
}

.generated-image-item .reject-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.generated-image-item:hover .reject-btn {
    opacity: 1;
}

/* Dataset Image Item */
.dataset-image-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
}

.dataset-image-item.verified {
    border-color: #198754;
}

.dataset-image-item.rejected {
    opacity: 0.4;
    filter: grayscale(100%);
    border-color: #dc3545;
}

.dataset-image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.dataset-image-item .status-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.dataset-image-item .actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    padding: 0.5rem;
    display: none;
    gap: 0.25rem;
}

.dataset-image-item:hover .actions {
    display: flex;
}

/* Metric Boxes */
.metric-box {
    padding: 1.5rem 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.metric-box:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Loading Tips Rotation */
@keyframes tipRotate {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.rotating-tip {
    animation: tipRotate 8s infinite;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.scenario-card {
    transition: transform 0.2s ease-in-out;
}

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

.btn {
    font-weight: 500;
    border-radius: 0.375rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-outline-warning {
    color: #fd7e14;
    border-color: #fd7e14;
}

.btn-outline-warning:hover {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: #fff;
}

.btn-outline-warning:disabled {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.text-primary {
    color: #0d6efd !important;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.bg-light {
    background-color: #f8f9fa !important;
}

pre {
    font-size: 0.875rem;
    max-height: 200px;
    overflow-y: auto;
}

.list-unstyled li {
    margin-bottom: 0.25rem;
}

/* Image styles */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Image generation spinner */
.image-generation-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 0.375rem;
}

.image-generation-spinner .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    color: #0d6efd;
}

.image-generation-spinner .spinner-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.scenario-card .card-img-top-container {
    position: relative;
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.775rem;
    }
}

/* Step indicators */
.card-header h5 i:first-child {
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

/* Success states */
.text-success {
    color: #198754 !important;
}

.border-success {
    border-color: #198754 !important;
}

/* Info states */
.text-info {
    color: #0dcaf0 !important;
}

.border-info {
    border-color: #0dcaf0 !important;
}

/* Warning states */
.text-warning {
    color: #ffc107 !important;
}

/* Disabled states */
.btn:disabled {
    opacity: 0.65;
    pointer-events: none;
}

/* Influencers list page styles */
.influencer-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e9ecef;
}

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

.card-img-top-container {
    position: relative;
    overflow: hidden;
}

.card-img-top-container .card-img-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 50%);
    padding: 0.75rem;
}

.influencer-card .badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

.influencer-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    font-size: 0.875rem;
}

.influencer-card .btn-group .btn {
    border-radius: 0.375rem;
}

.influencer-card .btn-group .btn:not(:last-child) {
    margin-right: 0.25rem;
}

/* Stats styling */
.influencer-card .fw-bold {
    font-size: 1.25rem;
    line-height: 1;
}

.influencer-card .text-muted {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Face preview tooltip - make it 3x larger */
.face-preview-tooltip {
    min-width: 200px !important;
    max-width: 750px !important;
}

.face-preview-tooltip img {
    width: 180px !important;
    height: 180px !important;
}

.face-preview-tooltip .small {
    font-size: 1rem !important; /* Make text larger too */
}

.face-preview-tooltip .text-muted {
    font-size: 0.9rem !important;
}

/* Photo Album Styles */
.photo-album-item {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    height: 100%;
}

.photo-album-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.photo-album-item .photo-actions {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.photo-album-item:hover .photo-actions {
    opacity: 1;
}

.photo-actions .btn {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.similar-image-item {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    height: 100%;
}

.similar-image-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.similar-image-item .badge {
    backdrop-filter: blur(10px);
    background-color: rgba(40, 167, 69, 0.9) !important;
}

/* Image generation spinner overlay */
.image-generation-spinner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.image-generation-spinner .spinner-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Photo album loading states */
.photo-album-container .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Ensure proper aspect ratio for album images */
.photo-album-item img,
.similar-image-item img {
    transition: transform 0.2s ease-in-out;
}

.photo-album-item:hover img,
.similar-image-item:hover img {
    transform: scale(1.05);
}