/* RFQ Sliding Pages Styles */

/* ============================================================
   MODERN FILE UPLOAD SECTION - Minimalist Design
   ============================================================ */

/* Page 1 Header Styling */
#rfqPage1 .title {
    font-family: "Jost", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #37517e;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

#rfqPage1 .description {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Override section overflow for file upload to allow dropdowns to display fully */
#file-upload-section {
    overflow: visible !important;
    padding: 0;
    background: transparent;
}

/* Modern Upload Container */
body.file-upload-page .rfq-upload-container {
    padding: 0;
    margin: 0 auto;
    max-width: min(1400px, calc(100% - 40px));
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

/* Modern Upload Form */
body.file-upload-page .rfq-upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Modern Upload Button */
body.file-upload-page .rfq-upload-form .btn-get-started[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 36px;
    margin-top: 20px;
    background: linear-gradient(135deg, #47b2e4 0%, #3d9fd1 100%);
    color: #fff;
    font-family: "Jost", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(71, 178, 228, 0.35);
}

body.file-upload-page .rfq-upload-form .btn-get-started[type="submit"]:hover {
    background: linear-gradient(135deg, #3d9fd1 0%, #3591c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(71, 178, 228, 0.45);
}

body.file-upload-page .rfq-upload-form .btn-get-started[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(71, 178, 228, 0.3);
}

/* Modern File Upload Drop Zone */
body.file-upload-page .rfq-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 700px;
    min-height: 180px;
    padding: 35px 40px;
    margin: 0 auto 10px;
    cursor: pointer;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient overlay on hover */
body.file-upload-page .rfq-file-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(71, 178, 228, 0.05) 0%, rgba(55, 81, 126, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: 18px;
}

body.file-upload-page .rfq-file-label:hover {
    border-color: #47b2e4;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(71, 178, 228, 0.15), 0 8px 25px rgba(0, 0, 0, 0.08);
}

body.file-upload-page .rfq-file-label:hover::before {
    opacity: 1;
}

/* Drag over state */
body.file-upload-page .rfq-file-label.drag-over {
    border-color: #47b2e4;
    border-style: solid;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    transform: scale(1.02);
    box-shadow: 0 25px 70px rgba(71, 178, 228, 0.25), 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Upload Icon */
body.file-upload-page .rfq-file-label i.bi,
body.file-upload-page .rfq-file-label .bi-cloud-arrow-up {
    font-size: 2.8rem;
    color: #47b2e4;
    margin-bottom: 0;
    transition: transform 0.4s ease, color 0.3s ease;
    display: block;
}

body.file-upload-page .rfq-file-label:hover i.bi,
body.file-upload-page .rfq-file-label:hover .bi-cloud-arrow-up {
    transform: translateY(-5px) scale(1.08);
    color: #3d9fd1;
}

/* Upload Text */
body.file-upload-page .rfq-file-label span,
body.file-upload-page .rfq-file-label #file-upload-text {
    font-family: "Jost", sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #37517e;
    text-align: center;
    line-height: 1.4;
    transition: color 0.3s ease;
}

body.file-upload-page .rfq-file-label:hover span,
body.file-upload-page .rfq-file-label:hover #file-upload-text {
    color: #2d4366;
}

/* Supported formats badge */
body.file-upload-page .rfq-file-label::after {
    content: 'STEP, STL, IGES, DXF, PDF and more';
    display: block;
    margin-top: 8px;
    padding: 6px 16px;
    background: rgba(71, 178, 228, 0.08);
    border: 1px solid rgba(71, 178, 228, 0.15);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.01em;
}

/* Active/Focus state */
body.file-upload-page .rfq-file-label:active {
    transform: translateY(-2px);
}

/* ===== Modern Page Background ===== */
body.file-upload-page {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    min-height: 100vh;
}

body.file-upload-page .page-content {
    background: transparent;
}

/* ===== Modern Breadcrumbs ===== */
body.file-upload-page #breadcrumbs {
    background: transparent;
    padding: 15px 0;
    margin-bottom: 10px;
}

body.file-upload-page #breadcrumbs ol {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.file-upload-page #breadcrumbs ol li {
    font-family: "Jost", sans-serif;
    font-size: 0.9rem;
    color: #64748b;
}

body.file-upload-page #breadcrumbs ol li a {
    color: #47b2e4;
    text-decoration: none;
    transition: color 0.2s ease;
}

body.file-upload-page #breadcrumbs ol li a:hover {
    color: #3d9fd1;
}

body.file-upload-page #breadcrumbs ol li + li::before {
    content: '/';
    margin-right: 8px;
    color: #cbd5e1;
}

/* ===== Upload Message Styling ===== */
#upload-message {
    font-family: "Jost", sans-serif;
    font-size: 0.9rem;
    color: #f59e0b !important;
    font-style: normal !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 10px;
    margin-bottom: 20px;
}

#upload-message::before {
    content: '\F33A';
    font-family: 'bootstrap-icons';
    font-size: 1rem;
    color: #f59e0b;
}

/* ===== Responsive Upload Zone ===== */
@media (max-width: 768px) {
    #rfqPage1 .title {
        font-size: 1.8rem;
    }
    
    #rfqPage1 .description {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    body.file-upload-page .rfq-file-label {
        min-height: 150px;
        padding: 30px 20px;
        border-radius: 14px;
        margin: 0 auto 10px;
    }
    
    body.file-upload-page .rfq-file-label i.bi,
    body.file-upload-page .rfq-file-label .bi-cloud-arrow-up {
        font-size: 2.4rem;
    }
    
    body.file-upload-page .rfq-file-label span,
    body.file-upload-page .rfq-file-label #file-upload-text {
        font-size: 1rem;
    }
    
    body.file-upload-page .rfq-file-label::after {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    
    body.file-upload-page .rfq-upload-form .btn-get-started[type="submit"] {
        padding: 12px 28px;
        font-size: 0.95rem;
        margin-bottom: 16px; /* Prevent button from being cut off */
    }
    
    /* Ensure upload form has proper bottom spacing */
    body.file-upload-page .rfq-upload-form {
        padding-bottom: 10px;
    }
}

@media (max-width: 480px) {
    #rfqPage1 .title {
        font-size: 1.5rem;
    }
    
    body.file-upload-page .rfq-file-label {
        min-height: 130px;
        padding: 25px 15px;
        border-radius: 12px;
        gap: 10px;
    }
    
    body.file-upload-page .rfq-file-label i.bi,
    body.file-upload-page .rfq-file-label .bi-cloud-arrow-up {
        font-size: 2rem;
    }
    
    body.file-upload-page .rfq-file-label span,
    body.file-upload-page .rfq-file-label #file-upload-text {
        font-size: 0.95rem;
    }
    
    body.file-upload-page .rfq-file-label::after {
        font-size: 0.7rem;
        margin-top: 6px;
        padding: 4px 10px;
    }
    
    body.file-upload-page .rfq-upload-form .btn-get-started[type="submit"] {
        padding: 12px 24px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 280px;
        margin-bottom: 20px; /* Extra bottom margin on small screens */
    }
    
    /* Ensure upload form has proper bottom spacing on small screens */
    body.file-upload-page .rfq-upload-form {
        padding-bottom: 15px;
    }
}

/* ===== Part Cards Container ===== */
.parts-cards-container {
    margin-top: 30px;
    padding: 0 20px;
}

.parts-cards-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Individual Part Card ===== */
.part-card {
    background: #fcfdff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.part-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
    background: #fafcff;
}

/* Part Card Header - Number and Delete */
.part-card-header {
    display: flex;
    align-items: stretch;
}

.part-card-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 16px 12px;
    font-weight: 700;
    font-size: 1.1rem;
    color: #37517e;
    border-right: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px 0 0 0;
}

.part-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Row 1: Files Section */
.part-card-files-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
}

.part-card-file-section {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.part-card-file-section:first-child {
    border-right: 1px solid #e5e7eb;
}

.part-card-file-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.part-card-file-label .suggested-badge {
    font-size: 0.65rem;
    color: #9ca3af;
    font-weight: 400;
    text-transform: none;
}

.part-card-filename {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
}

.part-card-filename i {
    color: #22c55e;
    font-size: 1rem;
    flex-shrink: 0;
}

.part-card-filename .filename-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Technical Drawing Upload Area */
.part-card-drawing-upload {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 42px;
}

.part-card-drawing-upload:hover {
    border-color: #47b2e4;
    background: #f0f9ff;
    color: #47b2e4;
}

.part-card-drawing-upload.attached {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-style: solid;
    color: #166534;
}

.part-card-drawing-upload.attached.missing {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-style: dashed;
    color: #92400e;
}

.part-card-drawing-upload.attached.missing:hover {
    background: #fef9c3;
    border-color: #facc15;
}

.part-card-drawing-upload.disabled {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.part-card-drawing-upload i {
    font-size: 1rem;
    flex-shrink: 0;
}

.part-card-drawing-upload input[type="file"] {
    display: none;
}

.part-card-drawing-upload .upload-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Delete Button */
.part-card-delete {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.part-card-delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.part-card-delete i {
    font-size: 1rem;
}

/* Row 2: Specifications Section */
.part-card-specs-row {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #e5e7eb;
    overflow: visible;
}

.part-card-spec-section {
    flex: 1;
    min-width: 180px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-right: 1px solid #e5e7eb;
    overflow: visible;
}

.part-card-spec-section:last-child {
    border-right: none;
}

.part-card-spec-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.part-card-spec-label .required {
    color: #ef4444;
}

/* Custom Dropdown Styling */
.part-card-select-wrapper {
    position: relative;
    overflow: visible;
}

.part-card-select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.part-card-select:focus {
    outline: none;
    border-color: #47b2e4;
    box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.15);
}

.part-card-select.select-success {
    border-color: #22c55e;
    background-color: white;
}

.part-card-select.select-warning {
    border-color: #f59e0b;
    background-color: white;
}

.part-card-select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6b7280;
    pointer-events: none;
}

/* Hide default arrow when custom dropdown is present */
.part-card-select-wrapper:has(.custom-dropdown-display)::after {
    display: none;
}

/* Price indicator styling in dropdowns */
.part-card-select option,
.part-card-select optgroup {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    padding: 8px 12px;
    line-height: 1.6;
}

.part-card-select optgroup {
    font-weight: 600;
    color: #1f2937;
    background-color: #f3f4f6;
}

/* ===== Custom Dropdown with Styled Price Indicators ===== */

/* Hide native select when custom dropdown is active */
.native-select-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* Custom dropdown display (replaces native select appearance) */
.custom-dropdown-display {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    box-sizing: border-box;
}

.custom-dropdown-display:hover {
    border-color: #d1d5db;
}

.custom-dropdown-display.open {
    border-color: #47b2e4;
    box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.15);
}

.custom-dropdown-display .display-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-dropdown-display .display-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6b7280;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-dropdown-display.open .display-arrow {
    transform: rotate(180deg);
}

/* Success/Warning states for custom dropdown display - outline only */
.custom-dropdown-display.select-success {
    border-color: #22c55e;
    background-color: white;
}

.custom-dropdown-display.select-warning {
    border-color: #f59e0b;
    background-color: white;
}

/* Custom dropdown list container */
.custom-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 280px;
    width: max-content;
    max-width: 360px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.custom-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown list with proper scrolling */
.custom-dropdown-list {
    max-height: 350px;
    overflow-y: auto;
    padding: 6px;
    padding-bottom: 10px;
}


/* Group header styling */
.custom-dropdown-group {
    padding: 10px 12px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #47b2e4;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 4px;
    position: sticky;
    top: 0;
    background: white;
}

.custom-dropdown-group:first-child {
    padding-top: 6px;
}

/* Individual dropdown item */
.custom-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    gap: 20px;
}

.custom-dropdown-item:hover {
    background-color: #f0f9ff;
}

.custom-dropdown-item.selected {
    background-color: #f0fdf4;
    border-left: 3px solid #22c55e;
    padding-left: 9px;
}

.custom-dropdown-item.default-item {
    color: #9ca3af;
    font-style: italic;
}

.custom-dropdown-item.default-item.selected {
    background-color: transparent;
    border-left: none;
    padding-left: 12px;
}

.custom-dropdown-item .item-text {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

/* ===== Price Indicator Styling ===== */
.price-indicator {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 3px 8px;
    background: #f8fafc;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.price-indicator .price-filled {
    color: #47b2e4;
    font-weight: 600;
}

.price-indicator .price-faded {
    color: #d1d5db;
    font-weight: 400;
}

/* Scrollbar styling for custom dropdown */
.custom-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-list::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 3px;
}

.custom-dropdown-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.custom-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Material Search Input */
.part-card-material-search {
    position: relative;
}

.part-card-material-search input {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    transition: all 0.2s ease;
}

.part-card-material-search input:focus {
    outline: none;
    border-color: #47b2e4;
    box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.15);
}

.part-card-material-search .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Row 3: Actions Row (Comments & Duplicate) */
.part-card-actions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.part-card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.part-card-action-btn:hover {
    border-color: #47b2e4;
    color: #47b2e4;
    background: #f0f9ff;
}

.part-card-action-btn.has-comment {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #d97706;
}

.part-card-action-btn i {
    font-size: 0.9rem;
}

.part-card-duplicate-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #47b2e4;
    border-radius: 6px;
    background: white;
    color: #47b2e4;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.part-card-duplicate-btn:hover {
    background: #47b2e4;
    color: white;
}

/* Row 4: Quantity Section */
.part-card-quantity-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    flex-wrap: wrap;
}

.part-card-quantity-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.part-card-quantity-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.part-card-quantity-label .required {
    color: #ef4444;
}

/* Quantity Input with +/- Buttons */
.part-card-quantity-control {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.part-card-quantity-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: none;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.part-card-quantity-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.part-card-quantity-btn:active {
    background: #d1d5db;
}

.part-card-quantity-input {
    width: 60px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    -moz-appearance: textfield;
}

.part-card-quantity-input::-webkit-outer-spin-button,
.part-card-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.part-card-quantity-input:focus {
    outline: none;
    background: #f0f9ff;
}

/* Add Alternative Quantity Button */
.part-card-add-alt-qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px dashed #47b2e4;
    border-radius: 6px;
    background: white;
    color: #47b2e4;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 26px;
}

.part-card-add-alt-qty:hover {
    background: #f0f9ff;
    border-style: solid;
}

/* Row 5: Alternative Quantities Chips */
.part-card-alt-quantities-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    min-height: 20px;
}

.part-card-alt-quantities-row:empty {
    display: none;
}

.part-card-alt-qty-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #0369a1;
    animation: chipAppear 0.3s ease;
}

.part-card-alt-qty-chip .chip-label {
    font-weight: 500;
}

.part-card-alt-qty-chip .chip-value {
    font-weight: 600;
}

.part-card-alt-qty-remove {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 105, 161, 0.1);
    border: none;
    border-radius: 50%;
    color: #0369a1;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.part-card-alt-qty-remove:hover {
    background: #ef4444;
    color: white;
}

/* PCBA Notice in Card */
.part-card-pcba-notice {
    padding: 12px 20px;
    background: #dbeafe;
    border-top: 1px solid #93c5fd;
    color: #1d4ed8;
    font-size: 0.85rem;
    line-height: 1.5;
}

.part-card-pcba-notice strong {
    display: block;
    margin-bottom: 4px;
}

.part-card-pcba-notice em {
    color: #3b82f6;
}

/* Cable Fabrication Notice in Card */
.part-card-cable-notice {
    padding: 12px 20px;
    background: #fef3c7;
    border-top: 1px solid #fcd34d;
    color: #92400e;
    font-size: 0.85rem;
    line-height: 1.5;
}

.part-card-cable-notice strong {
    display: block;
    margin-bottom: 4px;
}

.part-card-cable-notice em {
    color: #b45309;
}

/* Duplicated Part Card Styling */
.part-card.duplicated .part-card-filename {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.part-card.duplicated .part-card-filename i {
    color: #f59e0b;
}

/* ===== Responsive Adjustments for Part Cards ===== */
@media (max-width: 992px) {
    .part-card-spec-section {
        min-width: 150px;
        flex: 1 1 calc(50% - 1px);
    }
    
    .part-card-spec-section:nth-child(2) {
        border-right: none;
    }
    
    .part-card-spec-section:nth-child(3),
    .part-card-spec-section:nth-child(4) {
        border-top: 1px solid #e5e7eb;
    }
    
    .part-card-spec-section:nth-child(3) {
        border-right: 1px solid #e5e7eb;
    }
    
    .part-card-spec-section:nth-child(4) {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .parts-cards-container {
        padding: 0 10px;
    }
    
    .part-card-files-row {
        grid-template-columns: 1fr;
    }
    
    .part-card-file-section:first-child {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .part-card-spec-section {
        flex: 1 1 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .part-card-spec-section:last-child,
    .part-card-color-section:last-child {
        border-bottom: none;
    }
    
    .part-card-spec-section:nth-child(2),
    .part-card-spec-section:nth-child(3),
    .part-card-spec-section:nth-child(4) {
        border-top: none;
    }
    
    .part-card-quantity-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .part-card-add-alt-qty {
        margin-top: 10px;
    }
    
    .part-card-actions-row {
        flex-wrap: wrap;
    }
}

/* Drag and drop highlight for technical drawing */
.part-card-drawing-upload.drag-over {
    border-color: #47b2e4;
    background: #e0f2fe;
    box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.2);
}

/* Animation for new cards */
.part-card {
    animation: cardSlideIn 0.3s ease;
}

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

/* Quantity control improvements */
.part-card-quantity-control:focus-within {
    border-color: #47b2e4;
    box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.15);
}

/* Alternative quantity chip input styling */
.part-card-alt-qty-chip .chip-value-input:focus {
    outline: none;
}


/* Improved touch targets for mobile */
@media (max-width: 768px) {
    .part-card-quantity-btn {
        width: 44px;
        height: 44px;
    }
    
    .part-card-quantity-input {
        height: 44px;
    }
    
    .part-card-delete {
        width: 40px;
        height: 40px;
    }
    
    .part-card-action-btn,
    .part-card-duplicate-btn,
    .part-card-add-alt-qty {
        padding: 10px 16px;
    }
}

/* Tooltip for filename on hover */
.part-card-filename {
    position: relative;
    cursor: default;
}

.part-card-filename:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    bottom: 100%;
    margin-bottom: 5px;
    padding: 6px 10px;
    background: #1f2937;
    color: white;
    font-size: 0.8rem;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

/* Empty state for cards container */
.parts-cards-list:empty::after {
    content: 'No parts uploaded yet';
    display: block;
    text-align: center;
    padding: 40px;
    color: #9ca3af;
    font-style: italic;
}

/* Hover states for select dropdowns */
.part-card-select:hover {
    border-color: #d1d5db;
}

/* Focus improvements for accessibility */
.part-card-select:focus,
.part-card-action-btn:focus,
.part-card-duplicate-btn:focus,
.part-card-add-alt-qty:focus,
.part-card-delete:focus {
    outline: 2px solid #47b2e4;
    outline-offset: 2px;
}

/* Print styles - hide interactive elements */
@media print {
    .part-card-delete,
    .part-card-duplicate-btn,
    .part-card-add-alt-qty,
    .part-card-alt-qty-remove {
        display: none;
    }
    
    .part-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* ===== Pages Wrapper & Container ===== */
.rfq-pages-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    /* Height is set dynamically via JavaScript */
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.rfq-pages-container {
    display: flex;
    flex-wrap: nowrap;
    width: 200%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    align-items: flex-start;
}

.rfq-pages-container.slide-to-page2 {
    transform: translateX(-50%);
}

/* Page base styles - each page takes 50% of the 200% container */
.rfq-page {
    width: 50%;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Page 1 - default visible state with padding */
#rfqPage1 {
    padding: 20px 0;
}

/* Page 1 specific styles */
#rfqPage1 .title,
#rfqPage1 .description {
    text-align: center;
}

/* ===== Page 2: Review & Submit ===== */
/* Page 2 is collapsed by default to prevent affecting scroll height */
#rfqPage2 {
    padding: 30px 40px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0s 0.3s, min-height 0s 0.3s, overflow 0s 0.3s, visibility 0s 0.3s;
}

/* When sliding to Page 2, expand and show it */
.rfq-pages-container.slide-to-page2 #rfqPage2 {
    min-height: calc(100vh - 200px);
    max-height: none;
    overflow: visible;
    visibility: visible;
    transition: max-height 0s 0s, min-height 0s 0s, overflow 0s 0s, visibility 0s 0s;
}

/* When sliding to Page 2, collapse Page 1 */
.rfq-pages-container.slide-to-page2 #rfqPage1 {
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0s 0.3s, overflow 0s 0.3s, visibility 0s 0.3s;
}

.rfq-page2-header {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(55, 81, 126, 0.1);
}

.rfq-page2-header .title {
    color: #37517e;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.rfq-page2-header .description {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Back Button */
.rfq-back-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #37517e;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.rfq-back-button:hover {
    background: #37517e;
    border-color: #37517e;
    color: white;
}

.rfq-back-button i {
    font-size: 1.2rem;
}

/* Page 2 Content */
.rfq-page2-content {
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Step Indicators ===== */
.rfq-step-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    background: #e2e8f0;
    color: #64748b;
    transition: all 0.3s ease;
}

.step-item.completed .step-number {
    background: #10b981;
    color: white;
}

.step-item.active .step-number {
    background: #47b2e4;
    color: white;
    box-shadow: 0 0 0 4px rgba(71, 178, 228, 0.2);
}

.step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.step-item.completed .step-label,
.step-item.active .step-label {
    color: #37517e;
}

.step-divider {
    width: 80px;
    height: 3px;
    background: #e2e8f0;
    margin: 0 20px;
    position: relative;
    top: -12px;
}

.step-item.completed + .step-divider {
    background: linear-gradient(90deg, #10b981 0%, #47b2e4 100%);
}

/* ===== Section Cards ===== */
.rfq-summary-section,
.rfq-nda-section,
.rfq-supplier-section,
.rfq-custom-id-section {
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(55, 81, 126, 0.08);
}

.rfq-summary-section h3,
.rfq-nda-section h3,
.rfq-supplier-section h3,
.rfq-custom-id-section h3 {
    color: #37517e;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.rfq-summary-section h3 i,
.rfq-nda-section h3 i,
.rfq-supplier-section h3 i,
.rfq-custom-id-section h3 i {
    color: #47b2e4;
    font-size: 1.3rem;
}

/* ===== Custom RFQ ID Section ===== */
.custom-id-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.custom-id-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.custom-id-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-id-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.custom-id-label {
    font-weight: 600;
    color: #37517e;
    white-space: nowrap;
    min-width: 140px;
}

.custom-id-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: #37517e;
    transition: all 0.3s ease;
    background: white;
}

.custom-id-input:focus {
    outline: none;
    border-color: #47b2e4;
    box-shadow: 0 0 0 4px rgba(71, 178, 228, 0.1);
}

.custom-id-input::placeholder {
    color: #94a3b8;
}

.custom-id-input.valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.custom-id-input.invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.custom-id-input.checking {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.btn-validate-alias {
    padding: 12px 16px;
    background: linear-gradient(135deg, #47b2e4 0%, #3d9fd1 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-validate-alias:hover {
    background: linear-gradient(135deg, #3d9fd1 0%, #3591c0 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(71, 178, 228, 0.3);
}

.btn-validate-alias:active {
    transform: translateY(0);
}

.btn-validate-alias:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-validate-alias i {
    font-size: 1.1rem;
}

.btn-validate-alias.checking i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.alias-validation-message {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    display: none;
}

.alias-validation-message.show {
    display: block;
}

.alias-validation-message.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alias-validation-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alias-validation-message.warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alias-validation-message.info {
    background-color: #e7f5ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.system-id-note {
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #e2e8f0;
}

.system-id-note small {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #64748b;
    font-size: 0.85rem;
}

.system-id-note i {
    color: #47b2e4;
}

.system-id-note code {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #37517e;
    font-weight: 600;
}

.system-id-note .note-text {
    color: #94a3b8;
    font-style: italic;
}

/* ===== Parts Summary Section ===== */
.parts-summary-content {
    display: grid;
    gap: 12px;
}

.part-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #47b2e4;
}

.part-summary-item .part-name {
    font-weight: 600;
    color: #37517e;
}

.part-summary-item .part-details {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #64748b;
}

.part-summary-item .part-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.parts-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: linear-gradient(135deg, #37517e 0%, #47b2e4 100%);
    border-radius: 8px;
    color: white;
    margin-top: 10px;
}

.parts-summary-total .total-label {
    font-weight: 600;
}

.parts-summary-total .total-value {
    font-weight: 700;
}

/* ===== NDA Section ===== */
.nda-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nda-info {
    padding: 15px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.nda-info p {
    margin: 0;
    color: #166534;
}

.nda-details {
    margin-top: 10px !important;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nda-label {
    font-weight: 600;
}

.view-nda-link {
    color: #047857;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.view-nda-link:hover {
    color: #10b981;
}

/* NDA Toggle Switch */
.nda-toggle-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.nda-toggle-container:has(input:checked) {
    background: #e7f5ff;
    border-color: #47b2e4;
}

.nda-toggle {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.nda-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nda-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    border-radius: 28px;
    transition: 0.4s;
}

.nda-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nda-toggle input:checked + .nda-toggle-slider {
    background-color: #47b2e4;
}

.nda-toggle input:checked + .nda-toggle-slider:before {
    transform: translateX(24px);
}

.nda-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nda-toggle-text strong {
    color: #37517e;
    font-size: 1rem;
}

.nda-toggle-text small {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ===== Supplier Selection Section (Inline) ===== */
.supplier-selection-container-inline {
    margin-top: 0;
}

.supplier-selection-container-inline .selection-mode-toggle {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 0;
}

.supplier-selection-container-inline .toggle-option {
    display: flex;
    align-items: flex-start;
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.supplier-selection-container-inline .toggle-option:hover {
    border-color: #47b2e4;
    background-color: #f8fafc;
}

.supplier-selection-container-inline .toggle-option.active {
    border-color: #47b2e4;
    background: linear-gradient(135deg, #e7f5ff 0%, #f0f9ff 100%);
    box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.1);
}

.supplier-selection-container-inline .toggle-option input[type="radio"] {
    margin-right: 15px;
    margin-top: 4px;
    width: 20px;
    min-width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #47b2e4;
    cursor: pointer;
}

.supplier-selection-container-inline .toggle-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    text-align: left;
    flex: 1;
}

.supplier-selection-container-inline .toggle-text strong {
    color: #37517e;
    font-size: 1.05rem;
}

.supplier-selection-container-inline .toggle-text small {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Manual Supplier Section (Inline) */
.supplier-selection-container-inline .manual-supplier-section {
    margin-top: 20px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    animation: slideDown 0.3s ease;
}

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

.supplier-selection-container-inline .supplier-search-container {
    position: relative;
    margin-bottom: 25px;
}

.supplier-selection-container-inline .supplier-search-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #37517e;
}

.supplier-selection-container-inline .supplier-search-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.supplier-selection-container-inline .supplier-search-input:focus {
    outline: none;
    border-color: #47b2e4;
    box-shadow: 0 0 0 4px rgba(71, 178, 228, 0.1);
}

/* Search Results (Inline) */
.supplier-selection-container-inline .supplier-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 1000;
}

.supplier-selection-container-inline .supplier-search-result-item {
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.supplier-selection-container-inline .supplier-search-result-item:last-child {
    border-bottom: none;
}

.supplier-selection-container-inline .supplier-search-result-item:hover {
    background-color: #f8fafc;
}

.supplier-selection-container-inline .supplier-search-result-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.supplier-selection-container-inline .supplier-name {
    font-weight: 600;
    color: #37517e;
    margin-bottom: 6px;
}

.supplier-selection-container-inline .supplier-services {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.supplier-selection-container-inline .service-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.supplier-selection-container-inline .service-badge.matching {
    background-color: #d1fae5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.supplier-selection-container-inline .service-badge.non-matching {
    background-color: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

/* Selected Suppliers Chips (Inline) */
.supplier-selection-container-inline .selected-suppliers-container label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #37517e;
}

.supplier-selection-container-inline .suppliers-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 60px;
    padding: 15px;
    background: white;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
}

.supplier-selection-container-inline .no-suppliers-message {
    color: #94a3b8;
    font-style: italic;
    margin: 0;
    padding: 10px;
}

.supplier-selection-container-inline .supplier-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #37517e;
    color: white;
    border-radius: 8px;
    font-size: 0.9rem;
    animation: chipAppear 0.3s ease;
    box-shadow: 0 2px 6px rgba(55, 81, 126, 0.15);
    border-left: 3px solid #47b2e4;
    transition: all 0.2s ease;
}

.supplier-selection-container-inline .supplier-chip:hover {
    box-shadow: 0 3px 10px rgba(55, 81, 126, 0.2);
    transform: translateY(-1px);
}

@keyframes chipAppear {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.supplier-selection-container-inline .supplier-chip-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.supplier-selection-container-inline .supplier-chip-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.supplier-selection-container-inline .supplier-chip-services {
    font-size: 0.75rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.9);
}

.supplier-selection-container-inline .remove-supplier {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.supplier-selection-container-inline .remove-supplier:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Service Coverage Warning (Inline) */
.supplier-selection-container-inline .service-coverage-warning {
    margin-top: 20px;
    padding: 18px;
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    display: none;
}

.supplier-selection-container-inline .service-coverage-warning.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.supplier-selection-container-inline .service-coverage-warning-title {
    color: #b45309;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.supplier-selection-container-inline .service-coverage-warning-title::before {
    content: "\26A0";
    font-size: 1.2rem;
}

.supplier-selection-container-inline .service-coverage-warning-content {
    color: #92400e;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.supplier-selection-container-inline .uncovered-services-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.supplier-selection-container-inline .uncovered-service-item {
    display: inline-block;
    padding: 5px 12px;
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== Shipping Options Section ===== */
.rfq-shipping-section {
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(55, 81, 126, 0.08);
}

.rfq-shipping-section h3 {
    color: #37517e;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.rfq-shipping-section h3 i {
    color: #47b2e4;
    font-size: 1.3rem;
}

.shipping-selection-container {
    margin-top: 0;
}

.shipping-mode-toggle {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 0;
}

.shipping-mode-toggle .toggle-option {
    display: flex;
    align-items: flex-start;
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.shipping-mode-toggle .toggle-option:hover {
    border-color: #47b2e4;
    background-color: #f8fafc;
}

.shipping-mode-toggle .toggle-option.active {
    border-color: #47b2e4;
    background: linear-gradient(135deg, #e7f5ff 0%, #f0f9ff 100%);
    box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.1);
}

.shipping-mode-toggle .toggle-option input[type="radio"] {
    margin-right: 15px;
    margin-top: 4px;
    width: 20px;
    min-width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #47b2e4;
    cursor: pointer;
}

.shipping-mode-toggle .toggle-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    text-align: left;
    flex: 1;
}

.shipping-mode-toggle .toggle-text strong {
    color: #37517e;
    font-size: 1.05rem;
}

.shipping-mode-toggle .toggle-text small {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Own Shipping Section */
.own-shipping-section {
    margin-top: 20px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    animation: slideDown 0.3s ease;
}

.shipping-carrier-container,
.custom-carrier-container,
.shipping-account-container,
.shipping-contact-container {
    margin-bottom: 20px;
}

.shipping-carrier-container label,
.custom-carrier-container label,
.shipping-account-container label,
.shipping-contact-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #37517e;
}

.shipping-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #37517e;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2337517e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.shipping-select:focus {
    outline: none;
    border-color: #47b2e4;
    box-shadow: 0 0 0 4px rgba(71, 178, 228, 0.1);
}

.shipping-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: #37517e;
}

.shipping-input:focus {
    outline: none;
    border-color: #47b2e4;
    box-shadow: 0 0 0 4px rgba(71, 178, 228, 0.1);
}

.shipping-input::placeholder {
    color: #94a3b8;
}

.shipping-info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: #e7f5ff;
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 5px;
}

.shipping-info-note i {
    color: #47b2e4;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.custom-carrier-container {
    animation: slideDown 0.3s ease;
}

/* Responsive for shipping section */
@media (max-width: 768px) {
    .rfq-shipping-section {
        padding: 20px;
    }
    
    .own-shipping-section {
        padding: 20px;
    }
    
    .shipping-mode-toggle .toggle-option {
        padding: 15px;
    }
}

/* ===== Submit Section ===== */
.rfq-submit-section {
    text-align: center;
    margin-top: 30px;
    padding: 40px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(55, 81, 126, 0.08);
}

.btn-submit-rfq {
    position: relative;
    padding: 15px 52px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    font-family: "Poppins", sans-serif;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #37517e 0%, #3d5a8a 100%) !important;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(55, 81, 126, 0.15);
    overflow: hidden;
}

.btn-submit-rfq::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(71, 178, 228, 0.4), transparent);
}

.btn-submit-rfq:hover {
    background: linear-gradient(135deg, #2d4366 0%, #37517e 100%) !important;
    box-shadow: 0 4px 16px rgba(55, 81, 126, 0.25);
    transform: translateY(-1px);
}

.btn-submit-rfq:active {
    background: linear-gradient(135deg, #243751 0%, #2d4366 100%) !important;
    box-shadow: 0 2px 6px rgba(55, 81, 126, 0.2);
    transform: translateY(0);
}

.btn-submit-rfq:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-submit-rfq:disabled::before {
    display: none;
}

.btn-submit-rfq i {
    font-size: 1.05rem;
    opacity: 0.95;
}

.submit-note {
    margin-top: 16px;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    #rfqPage2 {
        padding: 20px;
    }

    .rfq-back-button {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin-bottom: 20px;
        width: 100%;
        justify-content: center;
    }

    .rfq-page2-header .title {
        font-size: 1.6rem;
    }

    .rfq-step-indicators {
        flex-direction: column;
        gap: 15px;
    }

    .step-divider {
        width: 3px;
        height: 30px;
        margin: 0;
        top: 0;
    }

    .rfq-summary-section,
    .rfq-nda-section,
    .rfq-supplier-section,
    .rfq-custom-id-section {
        padding: 20px;
    }

    .custom-id-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .custom-id-label {
        min-width: auto;
    }

    .custom-id-input {
        min-width: auto;
    }

    .btn-validate-alias {
        align-self: flex-start;
    }

    .system-id-note small {
        flex-direction: column;
        align-items: flex-start;
    }

    .part-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .part-summary-item .part-details {
        flex-wrap: wrap;
    }

    .nda-toggle-container {
        flex-direction: column;
    }

    .nda-toggle {
        order: -1;
    }

    .supplier-selection-container-inline .toggle-option {
        padding: 15px;
    }

    .btn-submit-rfq {
        width: 100%;
        justify-content: center;
        padding: 14px 30px !important;
    }
}

/* ===== No Results Message ===== */
.supplier-selection-container-inline .no-results-message {
    padding: 15px;
    text-align: center;
    color: #64748b;
    font-style: italic;
}

/* ===== Scrollbar Styling ===== */
.supplier-selection-container-inline .supplier-search-results::-webkit-scrollbar {
    width: 8px;
}

.supplier-selection-container-inline .supplier-search-results::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.supplier-selection-container-inline .supplier-search-results::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.supplier-selection-container-inline .supplier-search-results::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== CC Recipients Section ===== */
.rfq-cc-section {
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(55, 81, 126, 0.08);
}

.rfq-cc-section h3 {
    color: #37517e;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.rfq-cc-section h3 i {
    color: #47b2e4;
    font-size: 1.3rem;
}

.cc-description {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.cc-recipients-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Add Recipient Form */
.cc-add-recipient-form {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.cc-input-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.cc-email-input-wrapper {
    flex: 1;
    position: relative;
}

.cc-email-input-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #37517e;
}

.cc-email-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: #37517e;
    transition: all 0.3s ease;
    background: white;
}

.cc-email-input:focus {
    outline: none;
    border-color: #47b2e4;
    box-shadow: 0 0 0 4px rgba(71, 178, 228, 0.1);
}

.cc-email-input::placeholder {
    color: #94a3b8;
}

.cc-email-input.invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.cc-email-error {
    display: none;
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 0.8rem;
    color: #ef4444;
}

.cc-email-error.show {
    display: block;
}

.btn-add-cc-recipient {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #47b2e4 0%, #3d9fd1 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-add-cc-recipient:hover {
    background: linear-gradient(135deg, #3d9fd1 0%, #3591c0 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(71, 178, 228, 0.3);
}

.btn-add-cc-recipient:active {
    transform: translateY(0);
}

.btn-add-cc-recipient i {
    font-size: 1.1rem;
}

/* Notification Types */
.cc-notification-types {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.cc-types-label {
    display: block;
    font-weight: 600;
    color: #37517e;
    margin-bottom: 12px;
}

.cc-type-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cc-type-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cc-type-checkbox:hover {
    border-color: #47b2e4;
    background: #f0f9ff;
}

.cc-type-checkbox:has(input:checked) {
    border-color: #47b2e4;
    background: linear-gradient(135deg, #e7f5ff 0%, #f0f9ff 100%);
}

.cc-type-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #47b2e4;
    cursor: pointer;
    flex-shrink: 0;
}

.cc-type-indicator {
    display: none;
}

.cc-type-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.cc-type-content i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #47b2e4;
    opacity: 0.6;
}

.cc-type-checkbox {
    position: relative;
}

.cc-type-content .cc-type-name {
    font-weight: 600;
    color: #37517e;
    font-size: 0.95rem;
}

.cc-type-content small {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* CC Recipients List */
.cc-recipients-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 60px;
}

.cc-no-recipients {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 20px;
    margin: 0;
}

.cc-recipient-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    border-left: 4px solid #47b2e4;
    animation: slideDown 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.cc-recipient-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cc-recipient-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.cc-recipient-email {
    font-weight: 600;
    color: #37517e;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-recipient-email i {
    color: #47b2e4;
    font-size: 1rem;
}

.cc-recipient-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cc-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.cc-type-badge.quote {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.cc-type-badge.messaging {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.cc-type-badge.shipping {
    background: #d1fae5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.cc-type-badge i {
    font-size: 0.7rem;
}

.cc-recipient-remove {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cc-recipient-remove:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.cc-recipient-remove i {
    font-size: 1rem;
}

/* Responsive for CC section */
@media (max-width: 768px) {
    .rfq-cc-section {
        padding: 20px;
    }
    
    .cc-input-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-add-cc-recipient {
        justify-content: center;
    }
    
    .cc-type-content i {
        display: none;
    }
    
    .cc-recipient-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cc-recipient-remove {
        align-self: flex-end;
    }
}

/* ============================================================
   MOBILE-SPECIFIC STYLES FOR RFQ PAGE
   Enhanced mobile experience without affecting desktop
   ============================================================ */

/* ===== MOBILE: Part Cards Improvements ===== */
@media (max-width: 768px) {
    /* FIX: Page content must take full width on mobile */
    body.file-upload-page .page-content {
        padding: 0;
        padding-bottom: 120px; /* Account for fixed status bar */
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    /* FIX: Pages wrapper must take full viewport width */
    .rfq-pages-wrapper {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
    
    /* FIX: Pages container needs proper width calculation */
    .rfq-pages-container {
        width: 200vw;
    }
    
    /* FIX: Each page takes exactly viewport width */
    .rfq-page {
        width: 100vw;
        max-width: 100vw;
    }
    
    #rfqPage1 {
        padding: 16px 0;
    }
    
    /* FIX: Upload container must use full width on mobile */
    body.file-upload-page .rfq-upload-container {
        max-width: 100%;
        margin: 0;
        padding: 0 12px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Parts container mobile adjustments - prevent horizontal overflow */
    .parts-cards-container {
        padding: 0;
        margin-top: 20px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    .parts-cards-list {
        gap: 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Part card mobile layout - full width, prevent horizontal overflow */
    .part-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 10px;
        /* Allow vertical overflow for dropdowns, but prevent horizontal overflow */
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
    
    .part-card-content {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        /* Allow vertical overflow for dropdowns, but prevent horizontal overflow */
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }
    
    .part-card-header {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .part-card-number {
        min-width: auto;
        width: 100%;
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 10px 10px 0 0;
        justify-content: flex-start;
        gap: 10px;
    }
    
    .part-card-number::before {
        content: 'Part ';
        font-weight: 400;
        color: #6b7280;
    }
    
    /* File section row on mobile - stack vertically and prevent overflow */
    .part-card-files-row {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    /* File section mobile - constrain width */
    .part-card-file-section {
        padding: 14px 16px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .part-card-file-section:first-child {
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .part-card-file-label {
        font-size: 0.72rem;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .part-card-file-label .suggested-badge {
        font-size: 0.65rem;
    }
    
    /* Filename display - prevent overflow */
    .part-card-filename {
        padding: 12px;
        font-size: 0.85rem;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .part-card-filename .filename-text {
        flex: 1;
        min-width: 0; /* Critical for text-overflow to work in flexbox */
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .part-card-filename i {
        flex-shrink: 0;
    }
    
    /* Drawing upload mobile - improved touch targets and prevent overflow */
    .part-card-drawing-upload {
        padding: 12px 14px;
        font-size: 0.85rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .part-card-drawing-upload .upload-text {
        flex: 1;
        min-width: 0; /* Critical for text-overflow to work in flexbox */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .part-card-drawing-upload i {
        flex-shrink: 0;
        font-size: 1.1rem;
    }
    
    /* Specifications section mobile */
    .part-card-specs-row {
        padding: 0;
        overflow: visible !important; /* Allow dropdowns to show */
    }
    
    .part-card-spec-section {
        padding: 14px 16px;
        min-width: 100%;
        overflow: visible !important; /* Allow dropdowns to show */
        position: relative; /* For dropdown positioning */
    }
    
    /* CRITICAL: Allow dropdown to overflow on mobile */
    .part-card-select-wrapper {
        position: relative;
        overflow: visible !important;
        z-index: 1;
    }
    
    /* When dropdown is open, give the wrapper higher z-index */
    .part-card-select-wrapper:has(.custom-dropdown.open) {
        z-index: 100;
    }
    
    .part-card-spec-label {
        font-size: 0.72rem;
        margin-bottom: 4px;
    }
    
    /* Selects and inputs mobile */
    .part-card-select,
    .custom-dropdown-display {
        padding: 12px 40px 12px 14px;
        font-size: 0.9rem;
        min-height: 48px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure display text doesn't overflow */
    .custom-dropdown-display .display-text {
        max-width: calc(100% - 30px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 
     * Custom dropdown mobile - INLINE positioning (not bottom sheet)
     * Dropdown appears directly below the trigger element
     * No overlay, no fixed positioning, simple native-like behavior
     */
    .custom-dropdown {
        /* Use absolute positioning relative to wrapper, not fixed to viewport */
        position: absolute !important;
        top: calc(100% + 4px) !important;
        bottom: auto !important;
        left: 0 !important;
        right: auto !important;
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        min-width: 200px !important;
        border-radius: 10px;
        max-height: 280px;
        transform: none !important;
        z-index: 9999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border: 1px solid #e5e7eb;
    }
    
    .custom-dropdown.open {
        transform: none !important;
        animation: fadeInDropdown 0.15s ease-out;
    }
    
    @keyframes fadeInDropdown {
        from {
            opacity: 0;
            transform: translateY(-4px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .custom-dropdown-list {
        max-height: 260px;
        padding: 8px;
        padding-bottom: 8px;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        box-sizing: border-box;
    }
    
    .custom-dropdown-item {
        padding: 12px 14px;
        gap: 10px;
        min-height: 44px;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(71, 178, 228, 0.2);
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
        border-radius: 6px;
        margin-bottom: 2px;
    }
    
    .custom-dropdown-item:active {
        background-color: #e0f2fe;
    }
    
    .custom-dropdown-item .item-text {
        font-size: 0.9rem;
        pointer-events: none;
        text-align: left;
        flex: 1;
        white-space: normal;
        word-break: break-word;
    }
    
    .custom-dropdown-group {
        padding: 10px 14px 6px;
        font-size: 0.72rem;
    }
    
    /* Price indicator mobile */
    .price-indicator {
        font-size: 0.75rem;
        padding: 4px 8px;
        pointer-events: none; /* Ensure clicks go to parent dropdown item */
    }
    
    /* Actions row mobile */
    .part-card-actions-row {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .part-card-action-btn,
    .part-card-duplicate-btn {
        flex: 1;
        justify-content: center;
        padding: 12px 14px;
        font-size: 0.85rem;
    }
    
    /* Quantity row mobile */
    .part-card-quantity-row {
        padding: 16px;
        gap: 16px;
    }
    
    .part-card-quantity-section {
        width: 100%;
    }
    
    .part-card-quantity-control {
        width: 100%;
        max-width: 200px;
    }
    
    .part-card-quantity-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .part-card-quantity-input {
        width: 80px;
        height: 48px;
        font-size: 1rem;
    }
    
    .part-card-add-alt-qty {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        margin-top: 0;
    }
    
    /* Alternative quantities chips mobile */
    .part-card-alt-quantities-row {
        padding: 12px 16px;
        gap: 8px;
    }
    
    .part-card-alt-qty-chip {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    /* Delete button mobile positioning */
    .part-card-delete {
        top: 8px;
        right: 8px;
        width: 36px;
        height: 36px;
    }
    
    /* PCBA and Cable notices mobile */
    .part-card-pcba-notice,
    .part-card-cable-notice {
        padding: 12px 16px;
        font-size: 0.8rem;
    }
}

/* ===== MOBILE: Page 2 - RFQ Details ===== */
@media (max-width: 768px) {
    /* Page 2 container mobile */
    #rfqPage2 {
        padding: 16px 12px;
    }
    
    /* Page 2 header mobile */
    .rfq-page2-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    
    .rfq-page2-header .title {
        font-size: 1.5rem;
        margin-top: 10px;
    }
    
    .rfq-page2-header .description {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    /* Back button mobile */
    .rfq-back-button {
        position: relative;
        width: 100%;
        padding: 12px 16px;
        margin-bottom: 16px;
        border-radius: 10px;
    }
    
    .rfq-back-button span {
        flex: 1;
        text-align: center;
    }
    
    /* Page 2 content container mobile */
    .rfq-page2-content {
        padding: 0;
    }
    
    /* Step indicators mobile - horizontal on mobile */
    .rfq-step-indicators {
        flex-direction: row;
        gap: 0;
        padding: 16px 12px;
        margin-bottom: 24px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .step-item {
        flex: 1;
        min-width: 80px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    
    .step-label {
        font-size: 0.75rem;
        text-align: center;
    }
    
    .step-divider {
        width: 40px;
        height: 2px;
        margin: 0 8px;
        top: -10px;
    }
    
    /* Section cards mobile */
    .rfq-summary-section,
    .rfq-nda-section,
    .rfq-supplier-section,
    .rfq-custom-id-section,
    .rfq-shipping-section,
    .rfq-cc-section {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 10px;
    }
    
    .rfq-summary-section h3,
    .rfq-nda-section h3,
    .rfq-supplier-section h3,
    .rfq-custom-id-section h3,
    .rfq-shipping-section h3,
    .rfq-cc-section h3 {
        font-size: 1.1rem;
        gap: 8px;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }
    
    .rfq-summary-section h3 i,
    .rfq-nda-section h3 i,
    .rfq-supplier-section h3 i,
    .rfq-custom-id-section h3 i,
    .rfq-shipping-section h3 i,
    .rfq-cc-section h3 i {
        font-size: 1.1rem;
    }
    
    /* Custom ID section mobile */
    .custom-id-content {
        gap: 16px;
    }
    
    .custom-id-description {
        font-size: 0.9rem;
    }
    
    .custom-id-form {
        gap: 10px;
    }
    
    .custom-id-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .custom-id-label {
        min-width: auto;
        font-size: 0.9rem;
    }
    
    .custom-id-input {
        min-width: auto;
        width: 100%;
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .btn-validate-alias {
        width: 100%;
        padding: 14px 16px;
        justify-content: center;
    }
    
    .btn-validate-alias i {
        margin-right: 8px;
    }
    
    .btn-validate-alias::after {
        content: 'Check Availability';
    }
    
    .alias-validation-message {
        font-size: 0.85rem;
        padding: 10px 14px;
    }
    
    .system-id-note {
        padding: 12px;
    }
    
    .system-id-note small {
        font-size: 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    /* Parts summary mobile */
    .parts-summary-content {
        gap: 10px;
    }
    
    .part-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px;
    }
    
    .part-summary-item .part-name {
        font-size: 0.95rem;
        word-break: break-word;
    }
    
    .part-summary-item .part-details {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.85rem;
    }
    
    .parts-summary-total {
        flex-direction: column;
        gap: 8px;
        padding: 14px;
        text-align: center;
    }
    
    /* NDA section mobile */
    .nda-content {
        gap: 16px;
    }
    
    .nda-info {
        padding: 14px;
    }
    
    .nda-info p {
        font-size: 0.9rem;
    }
    
    .nda-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .nda-toggle-container {
        padding: 14px;
        flex-direction: row;
        align-items: center;
    }
    
    .nda-toggle {
        order: 0;
        flex-shrink: 0;
    }
    
    .nda-toggle-text {
        flex: 1;
    }
    
    .nda-toggle-text strong {
        font-size: 0.95rem;
    }
    
    .nda-toggle-text small {
        font-size: 0.8rem;
    }
    
    /* Supplier selection mobile */
    .supplier-selection-container-inline .selection-mode-toggle {
        gap: 12px;
    }
    
    .supplier-selection-container-inline .toggle-option {
        padding: 14px;
    }
    
    .supplier-selection-container-inline .toggle-option input[type="radio"] {
        margin-right: 12px;
        width: 22px;
        height: 22px;
    }
    
    .supplier-selection-container-inline .toggle-text strong {
        font-size: 0.95rem;
    }
    
    .supplier-selection-container-inline .toggle-text small {
        font-size: 0.85rem;
    }
    
    .supplier-selection-container-inline .manual-supplier-section {
        padding: 16px;
        margin-top: 16px;
    }
    
    .supplier-selection-container-inline .supplier-search-container {
        margin-bottom: 20px;
        position: relative; /* Required for absolute positioning of results */
    }
    
    .supplier-selection-container-inline .supplier-search-input {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    /* Supplier search results mobile - INLINE positioning (not bottom sheet) */
    .supplier-selection-container-inline .supplier-search-results {
        position: absolute !important;
        top: calc(100% + 4px) !important;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        max-height: 280px;
        border-radius: 10px;
        z-index: 9999;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border: 1px solid #e2e8f0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .supplier-selection-container-inline .supplier-search-result-item {
        padding: 16px;
        min-height: 48px;
    }
    
    .supplier-selection-container-inline .supplier-name {
        font-size: 0.95rem;
    }
    
    .supplier-selection-container-inline .supplier-services {
        gap: 6px;
    }
    
    .supplier-selection-container-inline .service-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    /* Selected suppliers chips mobile */
    .supplier-selection-container-inline .suppliers-chips {
        min-height: 70px;
        padding: 12px;
        gap: 10px;
    }
    
    .supplier-selection-container-inline .supplier-chip {
        padding: 10px 14px;
        font-size: 0.85rem;
        gap: 10px;
    }
    
    .supplier-selection-container-inline .supplier-chip-name {
        font-size: 0.85rem;
    }
    
    .supplier-selection-container-inline .supplier-chip-services {
        font-size: 0.72rem;
    }
    
    .supplier-selection-container-inline .remove-supplier {
        width: 26px;
        height: 26px;
    }
    
    /* Service coverage warning mobile */
    .supplier-selection-container-inline .service-coverage-warning {
        padding: 14px;
        margin-top: 16px;
    }
    
    .supplier-selection-container-inline .service-coverage-warning-title {
        font-size: 0.9rem;
    }
    
    .supplier-selection-container-inline .service-coverage-warning-content {
        font-size: 0.85rem;
    }
    
    .supplier-selection-container-inline .uncovered-service-item {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    /* Shipping section mobile */
    .shipping-mode-toggle {
        gap: 12px;
    }
    
    .shipping-mode-toggle .toggle-option {
        padding: 14px;
    }
    
    .shipping-mode-toggle .toggle-option input[type="radio"] {
        margin-right: 12px;
        width: 22px;
        height: 22px;
    }
    
    .shipping-mode-toggle .toggle-text strong {
        font-size: 0.95rem;
    }
    
    .shipping-mode-toggle .toggle-text small {
        font-size: 0.85rem;
    }
    
    .own-shipping-section {
        padding: 16px;
        margin-top: 16px;
    }
    
    .shipping-carrier-container,
    .custom-carrier-container,
    .shipping-account-container,
    .shipping-contact-container {
        margin-bottom: 16px;
    }
    
    .shipping-carrier-container label,
    .custom-carrier-container label,
    .shipping-account-container label,
    .shipping-contact-container label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .shipping-select,
    .shipping-input {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .shipping-info-note {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    /* CC Recipients section mobile */
    .cc-description {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    
    .cc-add-recipient-form {
        padding: 16px;
    }
    
    .cc-input-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .cc-email-input-wrapper label {
        font-size: 0.9rem;
    }
    
    .cc-email-input {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .btn-add-cc-recipient {
        width: 100%;
        padding: 14px 20px;
        justify-content: center;
    }
    
    .cc-notification-types {
        padding-top: 16px;
    }
    
    .cc-types-label {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .cc-type-checkboxes {
        gap: 10px;
    }
    
    .cc-type-checkbox {
        padding: 14px;
        gap: 12px;
    }
    
    .cc-type-checkbox input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
    
    .cc-type-content .cc-type-name {
        font-size: 0.9rem;
    }
    
    .cc-type-content small {
        font-size: 0.8rem;
    }
    
    .cc-type-content i {
        display: none;
    }
    
    .cc-recipients-list {
        gap: 10px;
    }
    
    .cc-recipient-item {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cc-recipient-email {
        font-size: 0.9rem;
    }
    
    .cc-recipient-types {
        gap: 6px;
    }
    
    .cc-type-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
    }
    
    .cc-recipient-remove {
        align-self: flex-end;
        padding: 10px;
    }
    
    /* Submit section mobile */
    .rfq-submit-section {
        padding: 24px 16px;
        margin-top: 20px;
    }
    
    .btn-submit-rfq {
        width: 100%;
        padding: 16px 24px !important;
        font-size: 1rem !important;
        justify-content: center;
    }
    
    .submit-note {
        margin-top: 14px;
        font-size: 0.75rem;
        padding: 0 10px;
    }
}

/* ===== EXTRA SMALL MOBILE (under 480px) ===== */
@media (max-width: 480px) {
    /* Page 1 adjustments */
    #rfqPage1 .title {
        font-size: 1.4rem;
        padding: 0 10px;
    }
    
    #rfqPage1 .description {
        font-size: 0.9rem;
        padding: 0 10px;
    }
    
    /* Part card extra small adjustments */
    .parts-cards-container {
        padding: 0 6px;
    }
    
    .part-card-file-section {
        padding: 12px;
    }
    
    .part-card-spec-section {
        padding: 12px;
    }
    
    .part-card-actions-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .part-card-action-btn,
    .part-card-duplicate-btn {
        width: 100%;
    }
    
    .part-card-quantity-row {
        padding: 12px;
    }
    
    /* Page 2 extra small adjustments */
    #rfqPage2 {
        padding: 12px 8px;
    }
    
    .rfq-page2-header .title {
        font-size: 1.3rem;
    }
    
    .rfq-page2-header .description {
        font-size: 0.88rem;
    }
    
    /* Step indicators - compact on extra small */
    .rfq-step-indicators {
        padding: 12px 8px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .step-label {
        font-size: 0.7rem;
    }
    
    .step-divider {
        width: 24px;
        margin: 0 4px;
    }
    
    /* Section cards extra small */
    .rfq-summary-section,
    .rfq-nda-section,
    .rfq-supplier-section,
    .rfq-custom-id-section,
    .rfq-shipping-section,
    .rfq-cc-section {
        padding: 14px 12px;
        margin-bottom: 12px;
    }
    
    .rfq-summary-section h3,
    .rfq-nda-section h3,
    .rfq-supplier-section h3,
    .rfq-custom-id-section h3,
    .rfq-shipping-section h3,
    .rfq-cc-section h3 {
        font-size: 1rem;
    }
    
    /* Toggle options extra small */
    .supplier-selection-container-inline .toggle-option,
    .shipping-mode-toggle .toggle-option {
        padding: 12px;
    }
    
    .supplier-selection-container-inline .toggle-text strong,
    .shipping-mode-toggle .toggle-text strong {
        font-size: 0.9rem;
    }
    
    .supplier-selection-container-inline .toggle-text small,
    .shipping-mode-toggle .toggle-text small {
        font-size: 0.8rem;
    }
    
    /* Submit section extra small */
    .rfq-submit-section {
        padding: 20px 12px;
    }
    
    .btn-submit-rfq {
        padding: 14px 20px !important;
        font-size: 0.95rem !important;
    }
}

/* ===== MOBILE: Simple Inline Dropdowns (No Overlay) ===== */
@media (max-width: 768px) {
    /* 
     * MOBILE DROPDOWN FIX:
     * - No overlay/backdrop
     * - Dropdown appears inline below the trigger (not fixed at bottom)
     * - Simple, clean mobile behavior
     */
    
    /* Remove any overlay - dropdowns should open cleanly without darkening the page */
    .custom-dropdown.open::before {
        display: none !important;
        content: none !important;
    }
    
    /* Remove handle bar - not needed for inline dropdowns */
    .custom-dropdown::after {
        display: none !important;
        content: none !important;
    }
    
    /* Reset the dropdown list padding */
    .custom-dropdown-list {
        padding-top: 6px;
    }
}

/* ===== MOBILE: Fix for horizontal overflow ===== */
@media (max-width: 768px) {
    .rfq-pages-wrapper {
        overflow-x: hidden;
    }
    
    .rfq-pages-container {
        overflow-x: hidden;
    }
    
    .rfq-page {
        overflow-x: hidden;
    }
    
    /* Prevent text overflow issues */
    .part-card-filename .filename-text,
    .part-card-drawing-upload .upload-text,
    .custom-dropdown-display .display-text,
    .supplier-chip-name,
    .cc-recipient-email {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* ===== MOBILE: Touch-friendly improvements ===== */
@media (max-width: 768px) {
    /* Larger touch targets */
    .part-card-select,
    .custom-dropdown-display,
    .part-card-drawing-upload,
    .shipping-select,
    .shipping-input,
    .custom-id-input,
    .cc-email-input,
    .supplier-search-input {
        min-height: 48px;
    }
    
    /* Better tap areas for buttons */
    button, 
    .btn-get-started,
    .rfq-back-button,
    .btn-validate-alias,
    .btn-add-cc-recipient,
    .btn-submit-rfq,
    .part-card-action-btn,
    .part-card-duplicate-btn,
    .part-card-add-alt-qty {
        min-height: 44px;
    }
    
    /* Radio and checkbox larger tap area */
    input[type="radio"],
    input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
    }
}

/* ===== MOBILE: Smooth scrolling and momentum ===== */
@media (max-width: 768px) {
    .custom-dropdown-list,
    .supplier-search-results,
    .parts-cards-list {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Touch action for faster tap responses */
    button,
    .btn,
    .custom-dropdown-display,
    .custom-dropdown-item,
    .part-card-action-btn,
    .part-card-duplicate-btn,
    .part-card-add-alt-qty,
    .part-card-delete,
    .part-card-quantity-btn,
    .part-card-drawing-upload,
    .rfq-back-button,
    .nda-toggle,
    .btn-submit-rfq {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(71, 178, 228, 0.2);
    }
}

/* ===== LANDSCAPE MOBILE ===== */
@media (max-width: 768px) and (orientation: landscape) {
    /* Reduce vertical padding in landscape */
    .rfq-step-indicators {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .rfq-summary-section,
    .rfq-nda-section,
    .rfq-supplier-section,
    .rfq-custom-id-section,
    .rfq-shipping-section,
    .rfq-cc-section {
        padding: 14px 16px;
        margin-bottom: 12px;
    }
    
    /* Smaller dropdown height in landscape - inline dropdowns */
    .custom-dropdown {
        max-height: 200px;
    }
    
    .custom-dropdown-list {
        max-height: 180px;
    }
    
    .supplier-selection-container-inline .supplier-search-results {
        max-height: 40vh;
    }
}

/* ===== MOBILE: Safe area insets for notched devices ===== */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        body.file-upload-page .page-content {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
            padding-bottom: max(120px, calc(env(safe-area-inset-bottom) + 100px));
        }
        
        #rfqPage2 {
            padding-left: max(12px, env(safe-area-inset-left));
            padding-right: max(12px, env(safe-area-inset-right));
        }
        
        .rfq-submit-section {
            padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
        }
    }
}

