/* ============================================
   Brand Form Styles - Reorganized by Section
   Each CSS rule includes a comment explaining which part of the form it styles
============================================ */

/* ============================================
   FORM VALIDATION STYLES
   Used for: Form field validation error display
============================================ */

/* Invalid form field border color (red border on validation error) */
.is-invalid {
    border-color: #dc3545 !important;
}

/* Validation error message display below invalid fields */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Invalid form control, select, and date input field styling */
.form-control.is-invalid,
.form-select.is-invalid,
.date-input-field.is-invalid {
    border-color: #dc3545 !important;
}

/* ============================================
   FORM SECTION (MULTI-STEP)
   Used for: Multi-step form container and step transitions
============================================ */

/* Form step transition animation (smooth fade/transform) */
#formSection .step {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s ease-out;
}

/* Form input fields transition animation (all form elements) */
#formSection input,
#formSection select,
#formSection textarea,
#formSection .form-control,
#formSection .form-select,
#formSection .custom-date-input,
#formSection .date-input-field,
#formSection .date-input-label,
#formSection label,
#formSection .invalid-feedback,
#formSection small.text-muted {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s ease-out,
                max-height 0.5s ease-out,
                margin-top 0.5s ease-out,
                margin-bottom 0.5s ease-out,
                padding-top 0.5s ease-out,
                padding-bottom 0.5s ease-out;
}

/* Hide form step when inputs are hidden (after search) */
#formSection.hide-inputs .step {
    transform: translateY(-100%);
    opacity: 0;
}

/* Hide all form inputs when form section is hidden (after search) */
#formSection.hide-inputs input,
#formSection.hide-inputs select,
#formSection.hide-inputs textarea,
#formSection.hide-inputs .form-control,
#formSection.hide-inputs .form-select,
#formSection.hide-inputs .custom-date-input,
#formSection.hide-inputs .date-input-field,
#formSection.hide-inputs .date-input-label,
#formSection.hide-inputs label,
#formSection.hide-inputs .invalid-feedback,
#formSection.hide-inputs small.text-muted,
#formSection.hide-inputs .mb-3,
#formSection.hide-inputs .row > * {
    transform: translateY(-100%);
    opacity: 0;
    max-height: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
    pointer-events: none;
}

/* Hide form buttons when form section is hidden */
#formSection.hide-inputs .d-flex.justify-content-end,
#formSection.hide-inputs .button-container,
#formSection.hide-inputs button {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   PRODUCT CARDS
   Used for: Product display cards in results section
============================================ */

/* Product title area buttons wrapper (Like, Add to Moodboard) */
.product-title-buttons {
    width: 100% !important;
}

@media (min-width: 768px) {
    .product-title-buttons {
        flex-shrink: 0;
        margin-left: auto !important;
    }
    
    .product-title-buttons button {
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    .product-title-buttons {
        width: 100% !important;
    }
    
    .product-title-buttons button {
        flex: 1;
        min-width: 0;
    }
    
    .product-card .d-flex.justify-content-between.align-items-start {
        flex-direction: column !important;
    }
    
    .product-title-buttons {
        width: 100% !important;
        margin-top: 12px;
    }
    
    .product-title-buttons button {
        width: 100% !important;
    }
}

/* Product action buttons container (always stacked vertically) */
.product-action-buttons {
    flex-direction: column !important;
    display: flex !important;
}

.product-action-buttons button {
    display: block !important;
    width: clamp(110px, calc(100vw * 0.12 + 58px), 202px) !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

/* ============================================
   BUTTONS
   Used for: All buttons throughout the form (Next, Back, Submit, Save & Search, etc.)
============================================ */

/* Success button styling (green - Save & Search button) */
.btn-success {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: #218838 !important;
    color: white !important;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .btn-success {
        font-size: 11px;
        padding: 6px 14px;
    }
}

@media (max-width: 575px) {
    .btn-success {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Desktop form buttons - compact and right aligned (fixed position at bottom right) */
@media (min-width: 768px) {
    /* Desktop Save & Search button compact styling */
    .form-btn-desktop.btn-success {
        padding: 6px 14px !important;
        font-size: 12px !important;
        height: 32px !important;
        min-width: 100px;
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Ensure button container aligns buttons properly */
    .d-flex.justify-content-end.gap-2 {
        align-items: center;
    }
    
    .d-flex.justify-content-end.gap-2 {
        gap: 8px !important;
    }
    
    .button-container {
        gap: 8px !important;
    }
    
    /* Ensure buttons are properly aligned */
    .d-flex.justify-content-end .form-btn-desktop {
        flex-shrink: 0;
    }
}

/* ============================================
   PROGRESS STEPPER SECTION
   Used for: Step progress indicator at top of form (1-6 steps)
============================================ */

/* Progress stepper horizontal container with step items */
.progress-stepper {
    gap: 20px;
    max-width: 1400px;
}

/* Individual step item container in progress stepper */
.step-item {
    padding: 0 2px;
    min-width: 140px;
}

@media (min-width: 992px) {
    .step-item {
        padding: 0;
        min-width: 160px;
    }
}

/* Step item label text below circle (step names) */
.step-item p {
    margin-top: 8px;
    font-size: 10px;
    color: #333;
    white-space: nowrap;
    display: block;
    line-height: 1.3;
    word-break: normal;
    padding: 0;
}

@media (min-width: 768px) {
    .step-item p {
        font-size: 18px;
        white-space: nowrap;
        word-break: normal;
        padding: 0;
    }
}

/* ============================================
   AI CHAT INTERFACE
   Used for: Split-screen chat interface (left: chat, right: products)
============================================ */

/* Split-screen wrapper - contains both chat and brand result sections */
.split-screen-wrapper {
    display: block;
    width: 100%;
    position: relative;
}

/* When chat is active, display as flex with 50-50 split */
.chat-active .split-screen-wrapper {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: stretch;
    /* Removed min-height: 80vh to prevent gaps at lower zoom levels */
}


/* Chat panel - slides from left */
.chat-panel {
    width: 100%;
    padding: 16px;
    background-color: #01437C;
    color: #333;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s ease-out;
    transform: translateX(-100%);
    opacity: 0;
    position: relative;
    z-index: 10;
    overflow: hidden;
    /* Removed max-width: 800px to allow full width in split view */
}

.chat-panel.active {
    transform: translateX(0);
    opacity: 1;
    padding: 16px;
    background-color: #01437C;
}

/* Ensure chat panel fills full height when active */
.chat-active .chat-panel {
    display: flex;
    flex-direction: column;
    height: 100%; /* Fill parent height to match brandResultSection */
    min-height: 600px; /* Minimum comfortable height */
}

/* Chat header with title and close button - dark blue background */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #01437C;
    color: #fff;
    border-bottom: none;
}

/* Chat header title styling */
.chat-header-title {
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    font-size: 24px;
    color: #fff;
    margin: 0;
    flex: 1;
}

/* Close chat button - white on dark blue */
.close-chat-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.close-chat-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50%;
}

/* Chat messages container (scrollable message area) - white background */
.chat-messages {
    flex: 1; /* Grow to fill available space */
    min-height: 400px; /* Minimum height */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    padding-bottom: 10px;
    margin-bottom: 0;
    font-family: 'Roboto', sans-serif;
    background: #fff;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth; /* Smooth scrolling like WhatsApp */
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}

/* Add spacer before first message to push messages to bottom when few */
.chat-messages::before {
    content: '';
    flex-grow: 1; /* Takes up all available space */
    /* When messages overflow, this becomes 0px tall automatically */
}

/* When chat is active, maintain fixed height */
.chat-active .chat-messages {
    height: 500px; /* Keep fixed height even when active */
    overflow-y: auto;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Individual chat message bubble styling */
.chat-message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 17px; /* Figma spec */
    font-weight: 400; /* Regular - Figma spec */
    line-height: 1.4;
    font-family: 'Roboto', sans-serif; /* Figma spec */
}

/* User messages - light orange background, white text, right side, flattened bottom-right */
.chat-message.user {
    background: #ff6b35;
    color: #fff;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 4px;
}

/* AI messages - white background, dark grey text, left side, flattened bottom-left */
.chat-message.ai {
    background: #F2F2F2;
    color: #31303D;
    margin-right: auto;
    text-align: left;
    border-bottom-left-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* Inline notification toast - after last AI message; does not affect height logic */
.chat-notification-toast {
    padding: 8px 14px;
    margin-bottom: 10px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.35;
    font-family: 'Roboto', sans-serif;
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    margin-right: auto;
    text-align: left;
    opacity: 1;
    transition: opacity 0.3s ease;
}
/* Typing indicator - animated dots */
.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Chat input field container */
.chat-input-container {
    padding: 2px 0px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

/* Chat input wrapper with icons */
.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
}

/* Left icons (+ and @ symbols) */
.chat-input-icon-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    flex-shrink: 0;
}

.chat-icon-plus {
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
}

.chat-icon-at {
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

/* Chat input field styling */
.chat-input {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #333;
    font-size: 15px; /* Figma spec */
    font-weight: 400; /* Regular - Figma spec */
    font-family: 'Poppins', sans-serif; /* Figma spec */
    line-height: 1.4;
    resize: none; /* Disable manual resize */
    overflow-y: auto; /* Scroll when exceeds max-height */
    overflow-x: hidden;
    min-height: 38px; /* Initial single-line height */
    max-height: 70px; /* Max 2 lines - scrollbar appears after 2nd line */
    transition: height 0.2s ease; /* Smooth height animation */
    /* Smooth scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.chat-input::-webkit-scrollbar {
    width: 4px;
}

.chat-input::-webkit-scrollbar-track {
    background: transparent;
}

.chat-input::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.chat-input::placeholder {
    color: #999;
    font-family: 'Poppins', sans-serif; /* Match input - Figma spec */
    font-weight: 400; /* Regular - Figma spec */
    font-size: 15px; /* Figma spec */
}

.chat-input:focus {
    outline: none;
}

/* Send chat message button (waveform/voice icon) */
.send-chat-btn {
    background: transparent;
    border: none;
    color: #666;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-chat-btn:hover {
    color: #333;
}

/* Chat action buttons container (Ask AI button) - orange full width button */
.chat-action-container {
    padding: 15px 0 0 0;
}

.ask-ai-button {
    width: 100%;
    background: #E7681F !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 14px 20px !important;
    font-size: 18px !important; /* Figma spec */
    font-weight: 500 !important; /* Medium - Figma spec */
    font-family: 'Poppins', sans-serif !important;
    transition: all 0.2s ease;
}

.ask-ai-button:hover {
    background: #d55a15 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 104, 31, 0.3);
}

/* Chat action buttons container (Ask AI button) */
.chat-action-container-old {
    width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* AI Chat Interface - full width on mobile */
    #aiChatInterface {
        width: 100% !important;
        margin: 20px 15px;
        padding: 0;
    }
    
    .chat-panel {
        width: 100%;
        max-width: 100%;
        border-radius: 8px;
        min-height: 400px;
    }

    .chat-messages {
        flex: 1; /* Flexible height on mobile too */
        min-height: 300px;
        /* Removed max-height to allow natural sizing on mobile */
    }
    
    /* Stack split-screen vertically on mobile */
    .chat-active .split-screen-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .chat-active #aiChatInterface {
        width: 100% !important;
        flex: 0 0 auto;
    }
    
    .chat-active #brandResultSection {
        width: 100% !important;
        flex: 0 0 auto;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    /* AI Chat Interface - 85% width on tablet */
    #aiChatInterface {
        width: 85% !important;
    }
}

/* AI Chat interface container - centered by default, 50% when chat active */
#aiChatInterface {
    display: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 20px auto;
    width: 60%;
    max-width: 900px;
}

#aiChatInterface.show {
    display: block !important;
    opacity: 1;
}

/* When chat is active - 50% width split screen layout */
.chat-active #aiChatInterface {
    width: 50%;
    max-width: none;
    margin: 0;
    flex: 0 0 50%;
    display: flex !important;
    flex-direction: column;
    align-self: stretch; /* Stretch to match sibling height */
}

.chat-active #brandResultSection {
    width: 50%;
    flex: 0 0 50%;
    display: flex !important;
    flex-direction: column;
    align-self: stretch; /* Stretch to match sibling height */
}

/* Brand Summary - Force single column layout when chat is active */
.chat-active #brandResultSection .brand-summary-text .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Adjust brand result heading size for narrow space */
.chat-active #brandResultSection .brand-result-heading {
    font-size: 34px !important;
}


/* Brand result section layout - flexbox for header and scrollable products */
#brandResultSection {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* Hide brand result section by default - must override display: flex */
#brandResultSection.brand-result-hidden {
    display: none !important;
}

.chat-active #aiChatAdvisorCard {
    display: none !important;
}

/* Moodboard card full width styling when chat is active */
.chat-active #moodboardCard.col-md-12 {
    max-width: 100%;
    flex: 0 0 100%;
}

/* Hide line break in moodboard heading when full width */
.chat-active #moodboardCard .section-heading br {
    display: none !important;
}

/* Ensure split-screen container is visible when chat is active */
.chat-active #aiChatInterface {
    display: block !important;
}

.chat-active #aiChatInterface.show {
    display: block !important;
}


/* Ensure container handles split-screen properly */
.chat-active .container {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* ============================================
   PRODUCT RESULTS SECTION
   Used for: Product display section after form submission ("Show Me What Fits My Brand")
============================================ */

/* ============================================
   BUTTON CONTAINERS
   Used for: Form button wrapper containers (Next/Back/Submit buttons)
============================================ */

/* Form button container wrapper (Next/Back/Submit buttons) */
.button-container {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-direction: column;
}

@media (min-width: 768px) {
    .button-container {
        flex-direction: row;
    }
}

.button-container .btn {
    height: 45px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .button-container .btn {
        height: auto !important;
        padding: 6px 16px !important;
        font-size: 13px !important;
        min-width: 80px;
    }
}

/* Product card mobile responsive styles (image and text side by side on mobile) */
@media (max-width: 768px) {
    /* Product card container mobile layout */
    .product-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    /* Product image wrapper mobile sizing (35% width) */
    .product-image-wrapper {
        width: 35% !important;
        max-width: 120px !important;
        height: auto !important;
        margin-bottom: 0 !important;
        overflow: visible !important;
    }
    
    .product-image-wrapper .product-image {
        object-fit: contain !important;
    }
    
    .product-image-container {
        overflow: visible !important;
    }
    
    .product-image-container .product-image {
        object-fit: contain !important;
    }
    
    /* Like button mobile responsive */
    .product-like-button {
        width: 28px !important;
        height: 28px !important;
        top: 6px !important;
        right: 6px !important;
    }
    
    .product-like-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Product text content mobile sizing (65% width) */
    .product-text-content {
        width: 65% !important;
        flex: 1 !important;
    }

    .product-card > div:last-child {
        flex-direction: row !important;
        width: 100% !important;
        gap: 8px !important;
    }
}

/* iPhone & Samsung specific product card (smaller screens) */
@media (max-width: 430px) {
    .product-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .product-image-wrapper {
        width: 30% !important;
        max-width: 100px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        overflow: visible !important;
    }
    
    .product-image {
        width: 100% !important;
        max-width: 100px !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    .product-image-container {
        width: 30% !important;
        max-width: 100px !important;
        flex-shrink: 0 !important;
        overflow: visible !important;
    }
    
    .product-image-container .product-image {
        width: 100% !important;
        max-width: 100px !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    .product-text-content {
        width: 70% !important;
        flex: 1 !important;
        margin-bottom: 0 !important;
    }

    .product-card > div:last-child {
        flex-direction: row !important;
        width: 100% !important;
        gap: 8px !important;
    }
    
    .product-buttons-wrapper {
        width: 100% !important;
        align-items: stretch !important;
        margin-top: 8px !important;
    }
    
    /* Like button mobile responsive - smaller screens */
    .product-like-button {
        width: 24px !important;
        height: 24px !important;
        top: 4px !important;
        right: 4px !important;
    }
    
    .product-like-icon {
        width: 14px !important;
        height: 14px !important;
    }
}

@media (max-width: 768px) {
    .product-buttons-wrapper {
        align-items: stretch !important;
        width: 100%;
    }
    .product-buttons-wrapper button {
        width: 100% !important;
    }
}

.custom-btn {
    width: 100%;
    min-width: 120px;
    height: 36px;
    font-size: 12px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .custom-btn {
        width: 140px;
        min-width: 140px;
        max-width: 140px;
        height: 36px;
        font-size: 12px;
        padding: 6px 12px;
        margin: 0;
        display: block;
    }
    
    .product-buttons-wrapper {
        flex-shrink: 0;
        gap: 8px;
        flex-direction: column;
        margin-left: 10px;
    }
}

@media (max-width: 767px) {
    .custom-btn {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .product-buttons-wrapper {
        align-items: center;
    }
}

/* Like button hover states (heart icon on product cards) */
#likeButton:hover,
#likeButtonDesktop:hover {
    border: none !important;
    box-shadow: none !important;
}

.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
    background-color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

#likeButton,
#likeButtonDesktop {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    color: inherit;
    margin: -15px !important;
}

@media (min-width: 768px) {
    #likeButtonDesktop {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        top: 5px !important;
        right: 5px !important;
        margin: -15px !important;
    }
}

@media (max-width: 767px) {
    #likeButton {
        top: 5px !important;
        right: 5px !important;
        margin: -14px !important;
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
    }
}

@media (max-width: 430px) {
    #likeButton {
        width: 28px !important;
        height: 19px !important;
        font-size: 14px !important;
        top: 8px !important;
        right: 8px !important;
    }
}

#likeButton:hover,
#likeButton:focus,
#likeButton:active {
    border: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

@media (min-width: 768px) {
    #likeButtonDesktop:hover,
    #likeButtonDesktop:focus,
    #likeButtonDesktop:active {
        background-color: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
    }
}

/* ============================================
   DATE INPUT FIELDS
   Used for: Custom styled date picker inputs (Deadline & Delivery dates)
============================================ */

/* Custom date input wrapper container */
.custom-date-input {
    position: relative;
    width: 100%;
    min-height: 38px;
    cursor: pointer;
}

/* Hidden date input field (overlay for native date picker) */
.date-input-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.01;
    cursor: pointer;
    z-index: 100;
    pointer-events: auto;
    min-height: 38px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .date-input-field {
        min-height: 38px;
        height: 38px;
    }
}

@media (max-width: 575px) {
    .date-input-field {
        min-height: calc(1.5em + 0.75rem + 2px);
        height: calc(1.5em + 0.75rem + 2px);
    }
}

@media (max-width: 430px) {
    .date-input-field {
        min-height: 44px;
        height: 44px;
    }
}

/* Visible date input label (custom styled button-like appearance) */
.date-input-label {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 38px;
    height: 38px;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 1;
}

/* Ensure label children also don't block pointer events, except the icon */
.date-input-label * {
    pointer-events: none;
}

/* Icon must be clickable - override the * rule */
.date-input-label .date-icon {
    pointer-events: auto !important;
}

@media (min-width: 768px) {
    .date-input-label {
        padding: 0.375rem 0.75rem;
        min-height: 38px;
        height: 38px;
        line-height: 1.5;
    }
}

@media (max-width: 575px) {
    .date-input-label {
        padding: 0.375rem 0.75rem;
        min-height: calc(1.5em + 0.75rem + 2px);
        height: calc(1.5em + 0.75rem + 2px);
        line-height: 1.5;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        font-size: 1rem;
    }
}

.date-input-label:hover {
    border-color: #c0c0c0;
}

/* Date input placeholder text ("Select Deadline Date", "Select Delivery Date") */
.date-placeholder {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 100% !important;
    letter-spacing: 0% !important;
    color: #9e9e9e !important;
    flex: 1;
    pointer-events: none;
}

/* Date picker calendar icon container */
.date-icon {
    display: flex;
    align-items: center;
    color: #9e9e9e;
    margin-left: 10px;
    cursor: pointer;
    z-index: 101;
    position: relative;
    pointer-events: auto;
}

.date-icon svg {
    width: 18px;
    height: 18px;
}

.date-input-field:focus + .date-input-label {
    border-color: #1a73e8;
    outline: none;
}

.date-input-field:not([value=""]) + .date-input-label .date-placeholder {
    color: #4a4a4a;
}

/* ============================================
   FLATPICKR DATE PICKER STYLING
   Used for: Custom styling of Flatpickr calendar to match form design
============================================ */

/* Hide Flatpickr's default input styling - we use our custom label */
.date-input-field.flatpickr-input {
    opacity: 0.01 !important;
    position: absolute !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}

/* Flatpickr calendar container styling */
.flatpickr-calendar {
    font-family: 'Roboto', sans-serif !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e0e0e0 !important;
    z-index: 10000 !important;
}

/* Flatpickr month/year header */
.flatpickr-month {
    background: #0b3d91 !important;
    color: #fff !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 10px !important;
    
}

.flatpickr-months .flatpickr-month
{
    height: 51px;
}

.flatpickr-current-month {
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

/* Month selector button in header - keep white text on blue background */
.flatpickr-monthDropdown {
    color: #fff !important;
    background: transparent !important;
}

.flatpickr-current-month .flatpickr-monthDropdown {
    color: #fff !important;
    background: transparent !important;
}

/* Ensure all text in month header is white */
.flatpickr-current-month,
.flatpickr-current-month * {
    color: #fff !important;
}

/* Override for month dropdown button specifically */
.flatpickr-current-month .flatpickr-monthDropdown,
.flatpickr-monthDropdown.flatpickr-monthDropdown {
    color: #fff !important;
    background: transparent !important;
}

.flatpickr-monthDropdown:hover,
.flatpickr-current-month .flatpickr-monthDropdown:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border-radius: 4px !important;
}

/* Month dropdown list container (the popup that appears) - white background with black text */
.flatpickr-monthDropdown-months {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    padding: 4px 0 !important;
    color: #000 !important;
}

/* Ensure dropdown list items override any white color from parent */
.flatpickr-monthDropdown-months * {
    color: #000 !important;
}

.flatpickr-monthDropdown-month {
    color: #000 !important;
    background: #fff !important;
    padding: 8px 12px !important;
}

.flatpickr-monthDropdown-months .flatpickr-monthDropdown-month {
    color: #000 !important;
    background: #fff !important;
}

.flatpickr-monthDropdown-month:hover {
    background: #f5f5f5 !important;
    color: #000 !important;
}

.flatpickr-monthDropdown-month.selected,
.flatpickr-monthDropdown-month.flatpickr-monthDropdown-month.selected {
    background: #0b3d91 !important;
    color: #fff !important;
}

/* Override for selected month in dropdown - white text on blue */
.flatpickr-monthDropdown-months .flatpickr-monthDropdown-month.selected {
    background: #0b3d91 !important;
    color: #fff !important;
}

/* Alternative class names for month dropdown */
.flatpickr-monthSelect-months .flatpickr-monthSelect-month {
    color: #000 !important;
    background: #fff !important;
}

.flatpickr-monthSelect-months .flatpickr-monthSelect-month:hover {
    background: #f5f5f5 !important;
    color: #000 !important;
}

.flatpickr-monthSelect-months .flatpickr-monthSelect-month.selected {
    background: #0b3d91 !important;
    color: #fff !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: #fff !important;
    fill: #fff !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px !important;
}

/* Weekday labels */
.flatpickr-weekdays {
    background: #f5f5f5 !important;
    padding: 8px 0 !important;
}

.flatpickr-weekday {
    color: #666 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}

/* Date cells */
.flatpickr-day {
    border-radius: 4px !important;
    font-size: 14px !important;
    color: #333 !important;
}

.flatpickr-day:hover {
    background: #e0e0e0 !important;
    border-color: #e0e0e0 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #0b3d91 !important;
    border-color: #0b3d91 !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.flatpickr-day.today {
    border-color: #ff6f20 !important;
    color: #ff6f20 !important;
    font-weight: 600 !important;
}

.flatpickr-day.today:hover {
    background: #ff6f20 !important;
    color: #fff !important;
}

.flatpickr-day.flatpickr-disabled {
    color: #ccc !important;
    cursor: not-allowed !important;
}

/* Ensure calendar appears above everything */
.flatpickr-calendar.open {
    z-index: 10000 !important;
}

/* Mobile responsive adjustments */
@media (max-width: 575px) {
    .flatpickr-calendar {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .flatpickr-day {
        height: 40px !important;
        line-height: 40px !important;
    }
}

@media (max-width: 767px) {
    .date-input-field:not([value=""]) + .date-input-label {
        height: calc(1.5em + 0.75rem + 2px) !important;
        min-height: calc(1.5em + 0.75rem + 2px) !important;
        padding: 0.375rem 0.75rem !important;
        box-sizing: border-box !important;
    }
    
    @media (max-width: 430px) {
        .date-input-field:not([value=""]) + .date-input-label {
            height: 44px !important;
            min-height: 44px !important;
            padding: 12px 14px !important;
            box-sizing: border-box !important;
        }
    }
}

/* Primary button style (orange - Next/Submit buttons) */
.btn-primary2 {
    background-color: #E76108;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .btn-primary2 {
        font-size: 11px;
        padding: 1px 0px;
    }
}

/* Desktop form buttons - compact and right aligned (fixed position) */
@media (min-width: 768px) {
    /* Form section with padding for fixed buttons */
    #formSection {
        position: relative;
        padding-bottom: 60px !important;
    }
    
    .step .d-flex.justify-content-end,
    .step .d-flex.justify-content-end.gap-2,
    .step .d-flex.justify-content-end.mt-3,
    .step .d-flex.justify-content-end.gap-2.mt-3,
    .step .d-flex.justify-content-end.gap-2.mt-3.flex-column,
    .step .d-flex.justify-content-end.gap-2.mt-3.flex-column.flex-md-row,
    .step .button-container {
        position: absolute !important;
        bottom: 20px !important;
        right: 20px !important;
        width: auto !important;
        margin: 0 !important;
        margin-top: 0 !important;
        z-index: 10 !important;
    }
    
    .step .d-flex.flex-column.flex-md-row {
        flex-direction: row !important;
    }
    
    .step:nth-child(1) .d-flex.justify-content-end,
    .step:nth-child(2) .d-flex.justify-content-end,
    .step:nth-child(3) .d-flex.justify-content-end,
    .step:nth-child(4) .d-flex.justify-content-end,
    .step:nth-child(5) .d-flex.justify-content-end,
    .step:nth-child(6) .button-container {
        position: absolute !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    /* Desktop form button compact styling (Next/Back/Save & Search) */
    .form-btn-desktop {
        padding: 6px 14px !important;
        font-size: 12px !important;
        height: 32px !important;
        min-width: 70px;
        max-width: 90px;
        line-height: 1.2;
    }
    
    .form-btn-desktop.btn-primary2 {
        padding: 6px 14px !important;
        font-size: 12px !important;
        height: 32px !important;
    }
    
    .form-btn-desktop.btn-secondary {
        padding: 6px 14px !important;
        font-size: 12px !important;
        height: 32px !important;
    }
    
    .d-flex.justify-content-end .form-btn-desktop {
        margin-left: auto;
    }
    
    .d-flex.justify-content-end.gap-2 {
        gap: 1px !important;
    }
    
    .button-container {
        gap: 1px !important;
    }
}

@media (max-width: 575px) {
    .btn-primary2 {
        font-size: 13px;
        padding: 8px 16px;
    }
}

.btn-primary2:hover,
.btn-primary2:focus,
.btn-primary2:active {
    background-color: #CE5200 !important;
    color: white !important;
    opacity: 0.9;
}

/* Progress stepper main container (horizontal step indicator) */
.progress-stepper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    max-width: 1160px;
    margin: 20px auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}

.progress-stepper::-webkit-scrollbar {
    display: none;
}

@media (max-width: 991px) {
    .progress-stepper {
        justify-content: flex-start;
        width: 100%;
        min-width: 100%;
        gap: 6px;
        padding: 10px 8px;
    }
    
    .step-item {
        min-width: 70px;
        flex: 0 0 auto;
        padding: 0 3px;
    }
    
    .step-item p {
        font-size: 9px;
        white-space: normal;
        word-break: break-word;
        line-height: 1.3;
        margin-top: 6px;
        padding: 0 2px;
    }
}

@media (max-width: 575px) {
    .step-item {
        min-width: 50px;
        padding: 0 2px;
        margin-right: 0;
        flex: 0 0 auto;
    }
    
    .step-item p {
        display: block;
        font-size: 8px;
        line-height: 1.4;
        margin-top: 6px;
        word-break: break-word;
        text-align: center;
        padding: 0 1px;
        min-height: 20px;
    }
    
    .circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .progress-stepper {
        padding: 8px 4px 12px 4px;
        margin: 15px auto;
        gap: 3px;
        width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        justify-content: flex-start;
    }
}

/* Individual step item container (flex layout) */
.step-item {
    flex: 1;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 5px;
    min-width: 0;
}

@media (min-width: 992px) {
    .step-item {
        padding: 0;
    }
}

/* Step circle number indicator (1-6) */
.circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #cdd3db;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #cdd3db;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease-in-out;
    position: relative;
    z-index: 1;
}

.step-item.active .circle {
    background-color: #0b3d91;
    border-color: #0b3d91;
    color: #fff;
}

.step-item.completed .circle {
    background-color: #0b3d91;
    border-color: #0b3d91;
    color: #fff;
}

.step-item p {
    margin-top: 8px;
    font-size: 18px;
    color: #333;
    white-space: normal;
    display: block;
    line-height: 1.3;
    word-break: break-word;
    padding: 0 2px;
}

@media (min-width: 768px) {
    .step-item p {
        font-size: 18px;
    }
}

@media (max-width: 575px) {
    .step-item p {
        font-size: 7px;
        line-height: 1.2;
        display: block;
        margin-top: 4px;
        word-break: break-word;
    }
}

@media (max-width: 400px) {
    .step-item p {
        font-size: 6px;
        line-height: 1.1;
    }
}

.step {
    display: none;
}

.step.active {
    display: block;
}

/* Connecting line between step items (progress indicator) */
.line {
    position: absolute;
    top: 17px;
    left: 50%;
    width: calc(100% - 34px);
    height: 3px;
    background: #cdd3db;
    z-index: 0;
    transform: translateX(17px);
    transition: background 0.3s ease-in-out;
}

@media (max-width: 991px) {
    .line {
        width: calc(100% - 28px);
        transform: translateX(14px);
    }
}

@media (max-width: 575px) {
    .line {
        top: 14px;
        width: calc(100% - 24px);
        transform: translateX(12px);
        height: 2px;
    }
}

/* Completed step line styling (blue when step is completed) */
.step-item.completed .line {
    background: #0b3d91;
}

/* Hide line for last step item */
.line.none {
    display: none;
}

/* Responsive text size utility class */

@media (min-width: 768px) {
    .small-md-normal {
        font-size: 1rem;
    }
}

/* Placeholder text styling - matches Roboto 16px, 400 weight, 100% line-height, 0% letter-spacing */
#formSection .form-control::placeholder,
#formSection textarea.form-control::placeholder {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 100% !important;
    letter-spacing: 0% !important;
    color: #9e9e9e !important;
}

/* Date input placeholder styling */
.date-placeholder {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 100% !important;
    letter-spacing: 0% !important;
    color: #9e9e9e !important;
}

/* Select dropdown placeholder option styling (first disabled option) */
#formSection .form-select option[disabled][selected][hidden] {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    /* Do NOT force line-height here; it can visually shrink option height in some browsers */
    letter-spacing: 0 !important;
    color: #9e9e9e !important;
}

/* Select dropdown displayed value + options styling (match Roboto spec without affecting control height) */
#formSection .form-select,
#formSection select {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    letter-spacing: 0 !important;
    /* Keep native/Bootstrap line-height & padding so dropdown height does not change */
}

#formSection .form-select option,
#formSection select option {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    letter-spacing: 0 !important;
}

/* Mobile form controls responsive styling (larger touch targets) */
@media (max-width: 575px) {
    .form-control,
    .form-select {
        font-size: 16px;
        padding: 8px 12px;
    }
    
    .form-control[rows] {
        min-height: 80px;
    }
    
    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Product image styling (responsive sizing - 120px desktop) */
.product-image {
    width: 100%;
    height: auto;
    max-width: 190px;
    border-radius: 8px;
}

/* Product image wrapper container (holds product image) */
.product-image-wrapper {
    flex-shrink: 0;
    position: relative;
}

@media (max-width: 767px) {
    .product-image-wrapper {
        width: 100%;
        max-width: 150px;
        margin: 0 auto;
        overflow: visible;
    }
    
    .product-image {
        width: 100%;
        max-width: 150px;
        height: auto;
        object-fit: contain;
    }
    
    .product-image-container {
        overflow: visible;
    }
    
    .product-image-container .product-image {
        object-fit: contain;
    }
}

@media (min-width: 768px) {
    .product-image {
        width: 120px;
        height: 120px;
        object-fit: cover;
        border-radius: 8px;
    }
    
    .product-image-wrapper {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }
    
    /* Product card desktop layout (horizontal: image + content) */
    .product-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        gap: 20px;
    }
    
    /* Product card content wrapper desktop layout */
    .product-card > div:last-child {
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 10px;
    }
    
    /* Product text content desktop layout (flexible width) */
    .product-text-content {
        flex: 1;
        min-width: 0;
        margin: 0;
    }
    
    /* Product buttons wrapper desktop layout (fixed 140px width, right aligned) */
    .product-buttons-wrapper {
        flex-shrink: 0;
        width: 140px;
        text-align: right;
    }
}

@media (min-width: 992px) {
    .product-text-content {
        padding: 0 20px;
    }
}

/* ============================================
   GLOBAL & BASE STYLES
   Used for: Global resets and base page styling
============================================ */

/* Global box-sizing reset for all elements */
* {
    box-sizing: border-box;
}

/* Prevent horizontal scroll on body and html elements */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Better spacing on mobile devices */
@media (max-width: 767px) {
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .print-icon-mobile {
        align-self: flex-end !important;
        margin-left: auto !important;
    }
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   Used for: Responsive design for mobile devices, tablets, and small screens
============================================ */

/* iPhone & Samsung Phone Optimizations (430px and below) */
@media (max-width: 430px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    body {
        padding: 8px !important;
    }
    
    h3 {
        font-size: 18px !important;
        line-height: 1.3 !important;
        margin-bottom: 12px !important;
    }
    
    .print-icon-mobile {
        align-self: flex-end !important;
        margin-left: auto !important;
    }
    
    .progress-stepper {
        padding: 8px 4px 15px 4px !important;
        margin: 12px auto !important;
        gap: 4px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    .progress-stepper::-webkit-scrollbar {
        display: none !important;
    }
    
    .step-item {
        min-width: 52px !important;
        padding: 0 2px !important;
        margin-right: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .circle {
        width: 26px !important;
        height: 26px !important;
        font-size: 11px !important;
        border-width: 1.5px !important;
    }
    
    .step-item p {
        font-size: 6px !important;
        line-height: 1.5 !important;
        margin-top: 6px !important;
        padding: 0 2px !important;
        min-height: 22px !important;
        word-break: break-word !important;
        white-space: normal !important;
    }
    
    .line {
        top: 13px !important;
        height: 2px !important;
        width: calc(100% - 20px) !important;
        transform: translateX(10px) !important;
    }
    
    section {
        padding: 12px !important;
        margin-top: 12px !important;
    }
    
    .form-control,
    .form-select {
        font-size: 16px !important;
        padding: 12px 14px !important;
        min-height: 44px !important;
        border-radius: 8px !important;
    }
    
    textarea.form-control {
        min-height: 100px !important;
        padding: 12px 14px !important;
    }
    
    .date-input-label {
        min-height: 44px !important;
        height: 44px !important;
        padding: 12px 14px !important;
        line-height: 1.5 !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        font-size: 16px !important;
    }
    
    .custom-date-input {
        height: 44px !important;
    }
    
    .date-placeholder {
        font-family: 'Roboto', sans-serif !important;
        font-weight: 400 !important;
        font-style: normal !important;
        font-size: 16px !important;
        line-height: 100% !important;
        letter-spacing: 0% !important;
    }
    
    .date-icon svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .btn-primary2,
    .btn {
        min-height: 44px !important;
        padding: 12px 20px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
    }
    
    .form-btn-desktop {
        width: 100% !important;
        min-height: 44px !important;
        padding: 12px 20px !important;
        font-size: 15px !important;
    }
    
    .product-card {
        padding: 12px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .product-image-wrapper {
        width: 30% !important;
        max-width: 100px !important;
        height: auto !important;
        flex-shrink: 0 !important;
        margin-bottom: 0 !important;
        overflow: visible !important;
    }
    
    .product-image {
        width: 100% !important;
        max-width: 100px !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    .product-text-content {
        width: 70% !important;
        flex: 1 !important;
        font-size: 13px !important;
    }
    
    .product-text-content h6 {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }
    
    .product-text-content ul {
        font-size: 11px !important;
    }
    
    .product-card > div:last-child {
        flex-direction: row !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .product-action-buttons button {
        display: block !important;
        width: clamp(110px, calc(100vw * 0.12 + 58px), 202px) !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }
    
    .product-buttons-wrapper {
        width: 100% !important;
        margin-top: 8px !important;
        align-items: stretch !important;
    }
    
    .custom-btn {
        width: 100% !important;
        min-height: 44px !important;
        font-size: 14px !important;
        padding: 12px !important;
    }
    
    .row.border-bottom {
        font-size: 12px !important;
        padding-bottom: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .col-12.col-md-6 {
        margin-bottom: 16px !important;
    }
    
    .col-12.col-md-6 .p-3 {
        padding: 16px !important;
    }
    
    .col-12.col-md-6 h5 {
        font-size: 15px !important;
        margin-bottom: 16px !important;
        line-height: 1.4 !important;
    }
    
    .col-12.col-md-6 .btn {
        width: 100% !important;
        min-height: 44px !important;
        padding: 12px 20px !important;
        font-size: 15px !important;
    }
}

/* iPhone SE & Small Samsung optimizations (375px and below) */
@media (max-width: 375px) {
    .step-item {
        min-width: 48px !important;
        padding: 0 1px !important;
        margin-right: 0 !important;
    }
    
    .step-item p {
        font-size: 5.5px !important;
        line-height: 1.5 !important;
        margin-top: 6px !important;
        padding: 0 1px !important;
        min-height: 20px !important;
    }
    
    .circle {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
    }
    
    .line {
        top: 12px !important;
        width: calc(100% - 18px) !important;
        transform: translateX(9px) !important;
    }
    
    .progress-stepper {
        gap: 3px !important;
        padding: 8px 2px 18px 2px !important;
    }
    
    h3 {
        font-size: 16px !important;
    }
    
    .product-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .product-image-wrapper {
        width: 28% !important;
        max-width: 90px !important;
        height: auto !important;
        flex-shrink: 0 !important;
        margin-bottom: 0 !important;
        overflow: visible !important;
    }
    
    .product-image {
        width: 100% !important;
        max-width: 90px !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    .product-image-container {
        width: 28% !important;
        max-width: 90px !important;
        flex-shrink: 0 !important;
        overflow: visible !important;
    }
    
    .product-image-container .product-image {
        width: 100% !important;
        max-width: 90px !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    .product-text-content {
        width: 72% !important;
        flex: 1 !important;
    }

    .product-card > div:last-child {
        flex-direction: row !important;
        width: 100% !important;
        gap: 8px !important;
    }
}

/* iPhone 12/13/14 & Medium Samsung optimizations (376px - 390px) */
@media (min-width: 376px) and (max-width: 390px) {
    .step-item {
        min-width: 50px !important;
        padding: 0 2px !important;
        margin-right: 0 !important;
    }
    
    .step-item p {
        font-size: 6.5px !important;
        line-height: 1.5 !important;
        margin-top: 6px !important;
        padding: 0 2px !important;
        min-height: 22px !important;
    }
    
    .progress-stepper {
        gap: 4px !important;
    }
}

/* iPhone 14 Pro Max & Large Samsung optimizations (391px - 430px) */
@media (min-width: 391px) and (max-width: 430px) {
    .step-item {
        min-width: 52px !important;
        padding: 0 2px !important;
        margin-right: 0 !important;
    }
    
    .step-item p {
        font-size: 7px !important;
        line-height: 1.5 !important;
        margin-top: 6px !important;
        padding: 0 2px !important;
        min-height: 24px !important;
    }
    
    .progress-stepper {
        gap: 4px !important;
    }
    
    .product-image-wrapper {
        width: 110px !important;
        max-width: 110px !important;
        height: 110px !important;
    }
    
    .product-image {
        width: 110px !important;
        height: 110px !important;
    }
    
    .product-text-content {
        width: calc(100% - 122px) !important;
    }
}

/* Landscape orientation optimizations for phones */
@media (max-width: 767px) and (orientation: landscape) {
    .progress-stepper {
        padding: 6px 0 !important;
    }
    
    .step-item p {
        font-size: 8px !important;
    }
    
    section {
        padding: 10px !important;
    }
}

/* Fix for Samsung Galaxy specific issues (412px and below) */
@media (max-width: 412px) {
    * {
        max-width: 100vw;
    }
    
    .container {
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ============================================
   INLINE STYLES CONVERTED TO CLASSES
   Used for: Classes converted from inline styles in brand_form.blade.php
============================================ */

/* Body overflow hidden class for main page container */
.body-overflow-hidden {
    overflow-x: hidden;
}

/* Main container max-width constraint (1200px) */
.container-max-width {
    max-width: 1240px;
}

/* ============================================
   MAIN HEADING & SUBTITLE SECTION
   Used for: Page header and subtitle text at top of form
============================================ */

/* Main page heading (h3) - "A little input from you..." */
.main-heading {
    text-align: center;
    font-weight: bold;
    font-size: 40px;
    font-family: 'Poppins', sans-serif;
}

/* Main page subtitle paragraph text styling */
.main-subtitle {
    text-align: center;
    font-size: 17px;
    font-family: 'Roboto', sans-serif;
}

/* Progress stepper overflow visible class */
.progress-stepper-visible {
    overflow-x: visible;
}

/* Step item label class styling (converted from inline) */
.step-item-label {
    font-weight: 600;
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
}

/* Hidden form fields (e.g., "Other" option textareas) */
.hidden-field {
    display: none;
}


/* Close chat button (X) styling */
.close-chat-button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Brand result section hidden state (initially hidden) */
.brand-result-hidden {
    display: none;
}

/* Brand result section main heading ("Show Me What Fits My Brand") */
/* Static header section - separate from scrollable content */
.brand-result-header-static {
    position: relative;
    background: #fff;
    z-index: 10;
    padding-bottom: 0;
    margin-bottom: 0;
    flex-shrink: 0;
}

/* Scrollable products container wrapper */
.products-container-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

/* Scrollable products container - products scroll here */
.products-container-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
    padding-top: 20px;
}

/* Custom scrollbar styling for products container */
.products-container-scrollable::-webkit-scrollbar {
    width: 8px;
}

.products-container-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.products-container-scrollable::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.products-container-scrollable::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.brand-result-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    font-size: 40px;
    line-height: normal;
    letter-spacing: 0;
}

/* Print icon alignment in results header (right side) */
.print-icon-align {
    align-self: flex-end;
}

/* Print icon size styling (50x50px) */
.print-icon-size {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

/* Brand summary information text (Prepared for, Purpose, etc.) */
.brand-summary-text {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
}

/* Section heading styling (AI Advisor, Moodboard cards) */
.section-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    font-size: 25px;
}

/* AI Chat Advisor button styling (orange) */
.ai-chat-advisor-btn {
    background: #E76108;
    border: none;
    width: 220px !important;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-advisor-btn img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    object-fit: contain;
}

.ai-chat-advisor-btn:hover {
    background: #CE5200 !important;
}

.ai-advisor-div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Create Moodboard button styling (blue) */
.create-moodboard-btn {
    background: #01437C;
    border: none;
    width: 220px !important;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    
}
.create-moodboard-btn:hover {
    background-color: #003766 !important;
}

/* Product Action Buttons Hover Styles */
.add-to-moodboard-btn:hover {
    background-color: #0568E2 !important;
}

.order-now-btn:hover {
    background-color: #CE5200 !important;
}

.order-sample-btn:hover {
    background-color:#29A81D !important;
}

/* Product Card Styles */
.product-card {
    /* Layout: Normal view - horizontal row */
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    
    /* Spacing (replaces mb-4, p-3) */
    margin-bottom: 1.5rem;
    padding: 1rem;
    
    /* Borders (replaces border, rounded-3) */
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    
    /* Background & Shadow */
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-card:last-child {
    margin-bottom: 0;
}

/* Row 1 wrapper: Image + Content together */
.product-main-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex: 1; /* Take available space */
    min-width: 0;
}

.product-image-container {
    width: 190px;
    flex-shrink: 0;
    position: relative;
    overflow: visible;
}

.product-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.product-like-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.95);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.product-like-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    pointer-events: none;
}

.product-content {
    /* Flex grow to fill space (replaces flex-grow-1) */
    flex: 1;
    min-width: 0;
    max-width: 620px;
}

.product-title {
    font-size: 22px;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 0.5rem; /* Replaces mb-2 */
    color: #0F0C2D;
}

.product-info {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 30px;
    letter-spacing: 0%;
    color: #31303D; /* Replaces text-secondary */
}

.product-info-item {
    margin-bottom: 0.25rem; /* Replaces mb-1 */
}

.product-supplier-info {
    /* Replaces d-flex align-items-center flex-wrap */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.product-badge-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
}

.product-action-buttons {
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    display: none; /* Hidden by default */
    margin: 40px;
    max-width: 300px;
}

/* Show action buttons on product card hover */
.product-card:hover .product-action-buttons {
    display: flex; /* Visible on hover */
}

/* Always show buttons on touch devices (no hover capability) */
@media (hover: none) and (pointer: coarse) {
    .product-action-buttons {
        display: flex !important;
        /* Center the buttons column vertically inside the product card
           so top/bottom whitespace looks equal on touch devices */
        align-self: center;
        margin-top: auto;
        margin-bottom: auto;
    }
}

.product-action-btn {
    width: 180px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 17px;    
    border: none;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.add-to-moodboard-btn {
    background: #0075F1;
    color: #ffffff;
}

.order-now-btn {
    background: #E76108;
    color: #ffffff;
    border: none;
}

.order-sample-btn {
    background: #37BC2A;
    color: #fff;
    border: none;
}

/* Responsive Styles for Product Cards */
@media (max-width: 991px) {
    .product-card {
        flex-direction: column;
        gap: 15px;
    }

    .product-image-container {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        overflow: visible !important;
    }
    
    .product-image-container .product-image {
        object-fit: contain !important;
    }
    
    /* Like button tablet/mobile responsive */
    .product-like-button {
        width: 30px !important;
        height: 30px !important;
        top: 6px !important;
        right: 6px !important;
    }
    
    .product-like-icon {
        width: 18px !important;
        height: 18px !important;
    }
    
    .product-content {
        width: 100%;
    }

    .product-title {
        font-size: 20px;
        /* text-align: center; */
    }

    .product-info {
        font-size: 14px;
        line-height: 24px;
        /* text-align: center; */
    }

    .product-action-buttons {
        width: 100%;
        margin: 20px auto;
        align-items: center;
        justify-content: center;
        display: flex !important;
    }

    .product-action-buttons button,
    .product-action-btn {
        width: 100% !important;
        max-width: 280px !important;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Tablet specific alignment (768px - 991px) */
@media (min-width: 576px) and (max-width: 991px) {
    .product-action-buttons {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
        align-items: center;
    }
}

@media (max-width: 575px) {
    .product-card {
        padding: 15px;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .product-image-container {
        max-width: 150px;
        overflow: visible !important;
    }
    
    .product-image-container .product-image {
        object-fit: contain !important;
        height: auto !important;
    }
    
    /* Like button mobile responsive */
    .product-like-button {
        width: 28px !important;
        height: 28px !important;
        top: 6px !important;
        right: 6px !important;
    }
    
    .product-like-icon {
        width: 16px !important;
        height: 16px !important;
    }

    .product-title {
        font-size: 18px;
    }

    .product-info {
        font-size: 13px;
        line-height: 22px;
    }

   


    .product-action-buttons {
        margin: 15px 0;
        gap: 10px;
        align-items: center;
        display: flex !important;
        justify-content: space-between; /* dono taraf se align */
    }
    

    .product-action-buttons button,
    .product-action-btn {
        font-size: 15px;
        padding: 10px 15px;
        width: auto !important;
        max-width: none !important;
        flex: 1 !important;
        margin-left: 0;
        margin-right: 0;
    }

    .product-card > div:last-child {
        flex-direction: row !important;
        width: 100% !important;
        gap: 20px !important;
        justify-content: center !important;
        align-items: center !important;
    }
}

/* ============================================
   SPLIT-SCREEN CHAT VIEW (NARROW VIEW)
   Applied when chat advisor is active - product cards adapt to 50% width
   Placed AFTER media queries to ensure proper cascade
============================================ */

/* Narrow view: Stack into two rows (Row 1: Image+Content, Row 2: Buttons) */
.chat-active .product-card {
    flex-direction: column !important;
    gap: 15px;
    padding: 12px;
}

/* Narrow view: Keep Row 1 wrapper horizontal */
.chat-active .product-main-row {
    width: 100%;
    gap: 15px;
}

/* Narrow view: Reduce image size to 120px */
.chat-active .product-image-container {
    width: 120px;
}

/* Narrow view: Adjust content width */
.chat-active .product-content {
    max-width: 100%;
}

/* Narrow view: Buttons in Row 2, horizontal layout */
.chat-active .product-action-buttons,
.chat-active .product-card > div:last-child {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    margin: 0 !important;
    justify-content: space-between !important;
    align-items: center !important;
}

/* Narrow view: Flexible button sizing for horizontal layout */
.chat-active .product-action-buttons button,
.chat-active .product-action-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 0 !important;
    font-size: 13px !important;
    padding: 8px 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Narrow view: Slightly smaller title */
.chat-active .product-title {
    font-size: 22px;
}

/* Narrow view: Slightly smaller info text */
.chat-active .product-info {
    font-size: 16px;
    line-height: 24px;
}

/* ============================================
   AI CONTENT LAZY LOADING ANIMATIONS
   Used for: Loading state and fade-in animation for AI-generated content
============================================ */

/* Loading dots animation for AI content */
.loading-dots {
    display: inline-block;
    color: #fff;
    font-style: italic;
    font-size: 0.9em;
    background: #ff6b35;
    padding: 0px 6px;
    border-radius: 5px;
}

.loading-dots span {
    animation: blink 1.4s infinite;
    animation-fill-mode: both;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 80%, 100% { 
        opacity: 0; 
    }
    40% { 
        opacity: 1; 
    }
}

/* Fade-in animation when AI content loads */
.fade-in {
    animation: fadeInContent 0.5s ease-in;
}

@keyframes fadeInContent {
    from { 
        opacity: 0;
        transform: translateY(-3px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }


    
}

/* Add to moodboard button state */
.add-to-moodboard-btn.added {
  background-color: #28a745 !important;
  color: #ffffff;
}

/* Notification */
.moodboard-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: #ffffff;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

.moodboard-notification a {
  color: #ffffff;
  text-decoration: underline;
  margin-left: 10px;
}
.custom-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 400;
    min-width: 250px;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
}

/* Toast types */
.custom-toast.success { background: #28a745; }
.custom-toast.error   { background: #dc3545; }
.custom-toast.info    { background: #17a2b8; }
.custom-toast.warning { background: #ffc107; }

/* Visible state */
.custom-toast.show {
    opacity: 1;
    transform: translateX(0);
}

/* Icon */
.custom-toast .toast-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

/* Message */
.custom-toast .toast-message {
    flex: 1;
    line-height: 1.4;
}

/* Close button */
.custom-toast .toast-close {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    opacity: 0.8;
    flex-shrink: 0;
    padding-left: 12px;
    line-height: 1;
}

.custom-toast .toast-close:hover {
    opacity: 1;
}

/* ============================================
   LARAVEL APP LOADER (iframe / initial load)
   Used for: Prevents white flash when app loads inside parent iframe
============================================ */
#laravel-app-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    transition: opacity 0.25s ease-out;
}
#laravel-app-loader.laravel-app-loader-hidden {
    opacity: 0;
    pointer-events: none;
}
#laravel-app-loader .laravel-app-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: laravel-app-loader-spin 0.7s linear infinite;
}
@keyframes laravel-app-loader-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   MOCK IT UP MODAL STYLES
   Used for: Modal popup for Mock It Up functionality
============================================ */

.mock-it-up-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mock-it-up-modal.show {
    display: flex;
}

.mock-it-up-modal.hidden {
    display: none !important;
    visibility: hidden;
}

.mock-it-up-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.mock-it-up-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mock-it-up-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e9ecef;
}

.mock-it-up-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.mock-it-up-modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.mock-it-up-modal-close:hover {
    color: #1a1a1a;
}

.mock-it-up-modal-body {
    padding: 24px;
}

.mock-it-up-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

.mock-it-up-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 40px;
    appearance: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.mock-it-up-select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.mock-it-up-select.is-invalid {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6 .4.4.4-.4M6 8.2V6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat, no-repeat;
    background-position: right 40px center, right 12px center;
    background-size: 16px 16px, 16px 12px;
    padding-right: 68px;
}

/* Mock It Up Modal Error Messages */
#mockItUpModal .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-family: 'Poppins', sans-serif;
}

#mockItUpModal .invalid-feedback i {
    margin-right: 4px;
    font-size: 0.875rem;
}

.mock-it-up-upload-area {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.mock-it-up-upload-area:hover {
    border-color: #0d6efd;
    background-color: #f0f7ff;
}

.mock-it-up-upload-area.is-invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.mock-it-up-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mock-it-up-upload-icon {
    width: 32px;
    height: 32px;
    color: #6c757d;
}

.mock-it-up-upload-text {
    font-size: 14px;
    color: #6c757d;
    font-family: 'Poppins', sans-serif;
}

.mock-it-up-preview {
    position: relative;
    border: 2px solid #ced4da;
    border-radius: 8px;
    padding: 10px;
    background-color: #f8f9fa;
    text-align: center;
}

.mock-it-up-preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
}

.mock-it-up-remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.mock-it-up-remove-preview:hover {
    background: #c82333;
}

.mock-it-up-modal-footer {
    padding: 20px 24px 24px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.mock-it-up-submit-btn {
    background-color: #E76108;
    color: #ffffff;
    border: none;
    width: 180px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins';
}

.mock-it-up-submit-btn:hover {
    background-color: #CE5200 !important;
    color: #ffffff !important;
}

.mock-it-up-submit-btn:active {
    background-color: #CE5200;
    color: #ffffff;
}

body.modal-open {
    overflow: hidden;
}

/* Responsive styles */
@media (max-width: 768px) {
    .mock-it-up-modal-content {
        max-width: 100%;
        margin: 10px;
    }
    
    .mock-it-up-modal-header {
        padding: 20px 20px 16px;
    }
    
    .mock-it-up-modal-body {
        padding: 20px;
    }
    
    .mock-it-up-modal-title {
        font-size: 18px;
    }
}

/* ============================================
   LOGO UPLOAD MODAL STYLES (Mock It Up)
   Used for: Logo upload options modal and media library
============================================ */

.logo-upload-modal {
    z-index: 10050 !important;
}

.logo-upload-modal .modal-backdrop {
    z-index: 10049 !important;
}

.logo-upload-modal .modal-dialog {
    max-width: 500px;
    z-index: 10051 !important;
}

.media-library-modal {
    z-index: 10050 !important;
}

.media-library-modal .modal-backdrop,
.modal-backdrop.show {
    z-index: 10049 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

.media-library-modal .modal-dialog {
    z-index: 10051 !important;
}

/* Ensure backdrop is visible for media library modal */
#mockItUpMediaLibraryModal.show ~ .modal-backdrop,
body:has(#mockItUpMediaLibraryModal.show) .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    z-index: 10049 !important;
}

.logo-upload-option-btn {
    width: 100%;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.logo-upload-option-btn:hover {
    border-color: #1a73e8;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.logo-upload-option-btn i {
    font-size: 24px;
    color: #1a73e8;
}

/* Media Library Modal Styles */
.media-library-modal .modal-dialog {
    max-width: 900px;
}

.media-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.media-library-item {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.media-library-item:hover {
    border-color: #1a73e8;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.media-library-item.selected {
    border-color: #1a73e8;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

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

.media-library-item .selected-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #1a73e8;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.media-library-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.media-library-empty {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Media Library Modal Footer Buttons */
#mockItUpMediaLibraryModal .modal-footer .btn {
    min-width: 120px;
    height: 32px;
    padding: 0px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
}

#mockItUpMediaLibraryModal .modal-footer .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

#mockItUpMediaLibraryModal .modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: #fff;
}

#mockItUpMediaLibraryModal .modal-footer .btn-primary {
    background-color: #1a73e8;
    border-color: #1a73e8;
    color: #fff;
}

#mockItUpMediaLibraryModal .modal-footer .btn-primary:hover:not(:disabled) {
    background-color: #1557b0;
    border-color: #1557b0;
    color: #fff;
}

#mockItUpMediaLibraryModal .modal-footer .btn-primary:disabled {
    background-color: #ccc;
    border-color: #ccc;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   MOCK IT UP SUCCESS MODAL
   Used for: Success modal after Mock It Up form submission
============================================ */

#mockItUpSuccessModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Ensure backdrop is visible for success modal */
#mockItUpSuccessModal.show ~ .modal-backdrop,
body:has(#mockItUpSuccessModal.show) .modal-backdrop,
.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    z-index: 1050 !important;
}

#mockItUpSuccessModal .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 24px 24px 20px;
}

#mockItUpSuccessModal .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    font-family: 'Poppins', sans-serif;
}

#mockItUpSuccessModal .modal-body {
    padding: 24px;
}

.mockup-image-section {
    margin-bottom: 0;
}

.mockup-image-container {
    position: relative;
    width: 100%;
}

.mockup-image-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-family: 'Poppins', sans-serif;
}

.mockup-image-placeholder {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
}

.mockup-loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    background-color: rgba(245, 245, 245, 0.9);
    border-radius: 8px;
}

.mockup-loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.mockup-loading-text {
    margin: 0;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.mockup-bookmark-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
}

.mockup-bookmark-icon:hover {
    color: #1a1a1a;
}

.mockup-success-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 24px;
    border-top: 1px solid #e9ecef;
}

.mockup-get-quote-btn {
    background-color: #0d6efd;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    flex: 1;
    transition: background-color 0.3s ease;
}

.mockup-get-quote-btn:hover {
    background-color: #0b5ed7;
    color: #ffffff;
}

.mockup-order-now-btn {
    background-color: #E76108;
    color: #ffffff;
    border: none;
    width: 180px;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
}

.mockup-order-now-btn:hover {
    background-color: #CE5200;
    color: #ffffff;
}

.mockup-order-sample-btn {
    background-color: #0dcaf0;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    flex: 1;
    transition: background-color 0.3s ease;
}

.mockup-order-sample-btn:hover {
    background-color: #0aa2c0;
    color: #ffffff;
}

@media (max-width: 768px) {
    .mockup-success-footer {
        flex-direction: column;
    }
    
    .mockup-get-quote-btn,
    .mockup-order-now-btn,
    .mockup-order-sample-btn {
        width: 100%;
    }
}
