/* main.css for SmartCloset AI */
/* All custom CSS from index.html moved here */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Pulse animation for AI response loading */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient background */
.gradient-bg {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in {
    animation: fadeIn 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animate whole page on load */
.page-fade-in {
    animation: fadeIn 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Section fade-in animations with different delays */
.section-fade-in {
    opacity: 0;
    animation: fadeInSection 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.section-fade-in.delay-1 { animation-delay: 0.2s; }
.section-fade-in.delay-2 { animation-delay: 0.6s; }
.section-fade-in.delay-3 { animation-delay: 1.0s; }
.section-fade-in.delay-4 { animation-delay: 1.4s; }
.section-fade-in.delay-5 { animation-delay: 1.8s; }
.section-fade-in.delay-6 { animation-delay: 2.2s; }
.section-fade-in.delay-7 { animation-delay: 2.6s; }
@keyframes fadeInSection {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Pulse animation for steps in 'hoe werkt het' */
@keyframes stepPulse {
    0% { box-shadow: 0 0 0 0 rgba(99,102,241,0.3); }
    50% { box-shadow: 0 0 0 12px rgba(99,102,241,0.12); }
    100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.3); }
}
.step-pulse {
    animation: stepPulse 5s cubic-bezier(0.4,0,0.6,1) infinite;
}
.step-pulse.delay-1 { animation-delay: 0s; }
.step-pulse.delay-2 { animation-delay: 0.4s; }
.step-pulse.delay-3 { animation-delay: 0.8s; }

/* Responsive hover effects for cards/steps */
.card-hover:hover, .step-hover:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 32px rgba(80, 56, 180, 0.12);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* Prijzen card hover effect */
#prijzen .bg-white:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 12px 32px rgba(80, 56, 180, 0.15);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
    border-color: #6366f1;
}

/* Gallery image card responsiveness and hover */
#gallery-grid > div {
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s cubic-bezier(0.4,0,0.2,1);
}
#gallery-grid > div:hover {
    transform: translateY(-8px) scale(1.04);
    box-shadow: 0 12px 32px rgba(80, 56, 180, 0.15);
}

/* =============================== */
/* Custom UI / Tailwind overrides  */
/* =============================== */

.flex.space-x-2,
button#generate-closet-btn,
.mt-2.flex.items-center.justify-between,
.bg-gray-50.p-4.border-r.border-gray-200.hidden.lg\:block {
    display: none !important;
}

.bg-gray-100 {
    background-color: #F5F4ED !important;
    max-width: 594px !important;
}

.p-3 {
    padding: 0.75rem;
    font-family: delight, sans-serif;
    font-size: 18px;
    line-height: 28px;
    font-weight: 400 !important;
}

button.bg-indigo-600.text-white.px-4.py-2.rounded-lg.font-medium.hover\:bg-indigo-700.transition.duration-300 {
    border-radius: 100px;
    background: #4B3516;
}

.border-gray-200 {
    border-style: none;
}

h3.font-medium.text-gray-900 {
    font-family: delight, sans-serif;
    font-weight: 400;
    font-size: 24px;
}

/* Override all gray text colors to use brand brown */
.text-gray-900 {
    color: #4B3516 !important;
}

.text-gray-800 {
    color: #4B3516 !important;
}

.text-gray-700 {
    color: #4B3516 !important;
}

.text-gray-600 {
    color: #4B3516 !important;
    opacity: 0.85;
}

.text-gray-500 {
    color: #4B3516 !important;
    opacity: 0.7;
}

.text-gray-400 {
    color: #4B3516 !important;
    opacity: 0.5;
}

.p-4.border-b.border-gray-200.flex.items-center.justify-between.bg-white {
    border-bottom: solid;
    border-color: #E5E2D0;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
}

/* Chat bubble */
.bg-indigo-600.text-white.p-3.rounded-lg.max-w-\[80\%\].fade-in {
    background: #E5E2D0;
    color: #4B3516;
}

/* =============================== */
/* Chat input system — FINAL       */
/* =============================== */

#chat-container {
    max-width: 875px;
    margin-left: auto;
    margin-right: auto;
}

#chat-form {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    max-width: 875px;
    margin: 0 auto;
    padding: 0 !important;
    position: relative;
}

#chat-input {
    flex: 1 1 auto;
    height: 60px !important;
    border-radius: 6px !important;
    font-family: delight, sans-serif;
    font-size: 16px;
    color: #4B3516 !important;
    background: #fff !important;
    border: 1px solid #e6e3d7;
    padding-left: 64px !important;
    padding-right: 16px !important;
    margin-left: 22px !important;
}
#chat-input::placeholder {
    color: #4B3516 !important;
    opacity: .6;
}
#chat-input:focus {
    outline: none;
    ring: 2px;
    --tw-ring-color: #6BA27C;
    border-color: #6BA27C;
    box-shadow: 0 0 0 2px rgba(107, 162, 124, 0.2);
}

/* Plus icon inside input */
#chat-form .plus-holder {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
}
#chat-form .plus-icon {
    width: 20px;
    height: 20px;
}

/* Send button */
#chat-form .send-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background: #4B3516;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s ease;
    margin-right: 20px;
    margin-left: 81px;
}
#chat-form .send-btn:hover {
    opacity: .9;
}

/* Control specific icon sizes */
#chat-form .plus-icon,
#chat-form .send-icon {
    max-width: 20px;
    height: auto;
}

/* AI Assistant icons in chat messages */
#chat-messages .h-10.w-10 img {
    flex-shrink: 0;
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* Genereer Impressie button in summary */
#generate-from-summary-btn {
    border-radius: 100px !important;
    background: #4B3516 !important;
    color: #ffffff !important;
    font-family: delight, sans-serif;
    font-size: 16px;
    padding: 10px 24px !important;
    transition: none !important;
    border: 2px solid #4B3516 !important;
}

#generate-from-summary-btn:hover:not(:disabled) {
    opacity: 0.9;
}

#generate-from-summary-btn:disabled {
    cursor: not-allowed;
    opacity: 1 !important;
}

#generate-from-summary-btn .btn-loading-content {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#generate-from-summary-btn .btn-loading-content:not(.hidden) {
    display: flex !important;
}

#generate-from-summary-btn .btn-loading-content.hidden {
    display: none !important;
}

#generate-from-summary-btn .loading-text {
    font-weight: 400;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

#generate-from-summary-btn .progress-percentage {
    font-weight: 600;
}

/* Loading spinner animation */
#generate-from-summary-btn .loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spinner-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Selected option buttons - green styling */
.option-btn.selected {
    background-color: #6BA27C !important;
    color: white !important;
    transition: background-color 0.2s ease;
}

.option-btn.selected:hover {
    background-color: #5a9169 !important;
}

.option-btn:not(.selected) {
    transition: background-color 0.2s ease;
}

.option-btn:not(.selected):hover {
    background-color: #e5e7eb !important;
}

/* Download button styling */
.download-btn {
    transition: all 0.2s ease;
}

.download-btn:hover {
    transform: scale(1.1);
}

.download-btn i.fa-check {
    color: #10b981 !important;
}

/* Background for entire page */
body {
    background-color: #F5F4ED !important;
}

/* Styling for the main chat/container area */
.lg\:col-span-2.flex.flex-col.h-\[600px\] {
    background-color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .rounded-xl, .rounded-2xl { border-radius: 1rem; }
    .p-6 { padding: 1.25rem; }
    .text-3xl { font-size: 1.75rem; }
    .text-lg { font-size: 1.125rem; }
    .max-w-7xl { max-width: 100vw; }

    /* Chat input responsive adjustments */
    #chat-input-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    #chat-form {
        padding: 0 !important;
        max-width: 100% !important;
    }

    #chat-input {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 50px !important;
        padding-right: 12px !important;
        width: 100% !important;
    }

    #chat-form .plus-holder {
        left: 16px;
    }

    #chat-form .send-btn {
        margin-left: 8px !important;
        margin-right: 0 !important;
        width: 44px;
        height: 44px;
    }

    #chat-container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Image preview thumbnails on mobile */
    .prompt-img-preview-multi {
        padding: 0 8px;
    }

    /* Prijzen section responsiveness */
    #prijzen .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    #prijzen .p-6 {
        padding: 1rem !important;
    }
    #prijzen h3 {
        font-size: 1.1rem !important;
    }
    #prijzen .text-2xl {
        font-size: 1.3rem !important;
    }
    #prijzen ul {
        font-size: 0.95rem !important;
    }
    #prijzen button {
        width: 100%;
        font-size: 1rem;
    }
    #gallery-grid {
        grid-template-columns: 1fr !important;
    }
    #gallery-grid > div img {
        height: 160px !important;
    }
}

/* Icon hover buttons for image gallery */
.icon-hover-btn {
    background: transparent !important;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    border-radius: 50%;
    box-shadow: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-hover-btn:hover {
    transform: scale(1.15);
    background: transparent !important;
    box-shadow: none;
}

.icon-hover-btn:hover img {
    filter: brightness(0.7) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.icon-hover-btn img {
    width: 30px;
    height: 30px;
    display: block;
    transition: filter 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Selected image preview styling */
.prompt-img-preview-multi {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 16px;
}

.prompt-img-preview {
    position: relative;
    display: inline-flex;
    align-items: center;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 4px;
    max-width: 120px;
}

.prompt-img-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.prompt-img-preview .remove-prompt-img {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ef4444;
    color: white;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s ease;
    padding: 0;
}

.prompt-img-preview .remove-prompt-img:hover {
    background-color: #dc2626;
    transform: scale(1.1);
}

.prompt-img-preview .remove-prompt-img i {
    font-size: 10px;
}

