/* --- Vault Container Styles --- */
.vault-upload-container {
    padding: 2rem;
    padding-top: 3rem;
    width: 100%;
    height: calc(100vh - 60px);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Bootstrap container overrides */
.vault-upload-container .container-fluid {
    max-width: 1200px;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: auto;
}

.vault-header {
    margin-bottom: 3rem;
    flex-shrink: 0;
}

.vault-header h2 {
    font-family: var(--title-font);
    font-weight: var(--font-weight-regular);
    font-size: 48px;
    color: #000000;
    line-height: 1.2;
    margin: 0 0 8px 0;
}

.vault-header p {
    font-weight: var(--font-weight-medium);
    font-size: 20px;
    color: #5c777f;
    line-height: 1.4;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Bootstrap Grid Visualization Overlay */
.bootstrap-grid-guides {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1000;
    display: none;
}

.bootstrap-grid-guides.active {
    display: block;
}

.bootstrap-grid-container {
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
}

.bootstrap-grid-row {
    display: flex;
    height: 100%;
    margin-left: -12px;
    margin-right: -12px;
}

.bootstrap-grid-col {
    flex: 0 0 8.333333%;
    /* 1/12 of the width */
    max-width: 8.333333%;
    padding-left: 12px;
    padding-right: 12px;
    position: relative;
}

.bootstrap-grid-col-inner {
    height: 100%;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
}

.bootstrap-grid-label {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    min-width: 16px;
    text-align: center;
}

/* Responsive grid adjustments */
@media (max-width: 1199.98px) {
    .bootstrap-grid-container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 991.98px) {
    .bootstrap-grid-container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 767.98px) {
    .bootstrap-grid-container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Toggle Button */
.column-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s ease;
}

.column-toggle:hover {
    background: #0056b3;
}

.column-toggle.active {
    background: #dc3545;
}

.column-toggle.active:hover {
    background: #c82333;
}

.upload-section-row {}

/* Remove Bootstrap's default gutters for this specific row */
.upload-section-row {
    --bs-gutter-x: 60px;
}

/* --- Upload Progress Styles --- */
.upload-progress {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007bff;
    width: 0%;
    transition: width 0.3s ease;
}

/* --- Upload Dropzone Styles --- */
.upload-dropzone-fancy {
    background: #fff;
    border: 2px dashed #e7edf3;
    border-radius: 36px;
    width: 100%;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.3s, background 0.3s;
    cursor: pointer;
    box-sizing: border-box;
}

.upload-dropzone-fancy.dragover {
    border-color: #075cfb;
    background: #f0f7ff;
}

.upload-icon-fancy {
    margin-bottom: 33px;
}

.upload-icon-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #075cfb;
    border-radius: 12px;
    width: 36px;
    height: 36px;
}

.upload-icon-img {
    width: 20px;
    height: 20px;
    display: block;
}

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

.upload-main-text {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    color: #000;
    margin-bottom: 0;
    text-align: center;
}

.upload-browse {
    color: #075cfb;
    cursor: pointer;
    text-decoration: underline;
}

.upload-sub-text {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    color: #5c777f;
    text-align: center;
}

/* --- Recommended Documents Card --- */
.recommended-documents-card {
    background: #f0f7ff;
    border-radius: 36px;
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    padding: 48px;
    box-sizing: border-box;
    justify-content: flex-start;
    gap: 36px;
}

.recommended-title {
    font-family: var(--primary-font);
    font-size: 24px;
    color: #000;
    font-weight: var(--font-weight-medium);
    margin: 0;
    line-height: 1.2;
    height: 29px;
}

.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.recommended-item {
    margin: 0;
    height: 47px;
    position: relative;
}

.recommended-item-title {
    font-family: var(--primary-font);
    font-size: 16px;
    color: #000;
    font-weight: var(--font-weight-medium);
    margin: 0;
    line-height: 1;
    position: absolute;
    top: 0;
    left: 0;
}

.recommended-item-desc {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    color: #5c777f;
    margin: 0;
    line-height: 1;
    position: absolute;
    top: 23px;
    left: 0;
}

/* --- Documents Table Section (Figma Design) --- */
.documents-table-section {
    margin-top: 60px;
    width: 100%;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 55px;
    margin-bottom: 30px;
}

.spacer {
    flex: 1;
}

.refresh-btn-figma {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 24px;
    background: transparent;
    border: 1.5px solid #000000;
    border-radius: 100px;
    font-family: var(--primary-font);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.refresh-btn-figma:hover {
    background: #f8f9fa;
}

.refresh-icon {
    width: 18px;
    height: 18px;
}

.documents-table {
    width: 100%;
}

.table-headers {
    display: flex;
    align-items: center;
    height: 55px;
    font-family: var(--primary-font);
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    line-height: 1;
}

.header-col {
    display: flex;
    align-items: center;
}

.header-document {
    flex: 4;
    min-width: 0;
    padding-right: 8px;
}

.header-type {
    flex: 0.9;
    min-width: 0;
    padding-right: 8px;
}

.header-date {
    flex: 0.9;
    min-width: 0;
    padding-right: 8px;
}

.header-status {
    flex: 1.0;
    min-width: 0;
    padding-right: 8px;
}

.header-action {
    flex: 1.2;
    min-width: 0;
}

.table-divider {
    width: 100%;
    height: 1px;
    background: #e6f1fc;
    margin-bottom: 10px;
}

.table-rows {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.table-row {
    display: flex;
    align-items: center;
    height: 55px;
    font-family: var(--primary-font);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: #000000;
    line-height: 1.4;
    padding: 0;
    /* Ensure no padding affects centering */
    width: 100%;
    box-sizing: border-box;
}

.table-row:last-child {
    margin-bottom: 0;
}

.row-document {
    flex: 4;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 55px;
    /* Match table row height for proper centering */
    padding-right: 8px;
    /* Add space before next column */
}

.file-icon-container {
    width: 30px;
    height: 30px;
    background: #f0f7ff;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon-container img {
    width: 18px;
    height: 18px;
}

.document-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
    /* Ensure space within document column */
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.row-filename {
    flex: 2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
    /* Ensure space within document column */
    font-family: var(--primary-font);
    font-weight: var(--font-weight-regular);
    font-size: 14px;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.row-type {
    flex: 0.9;
    min-width: 0;
    height: 55px;
    /* Match table row height for proper centering */
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
    /* Ensure space within document column */
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.row-date {
    flex: 0.9;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
    /* Ensure space within document column */
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.row-status {
    flex: 1.0;
    min-width: 0;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-right: 8px;
    /* Ensure space within status column */
}

.processing-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 6px 16px;
    border-radius: 12px;
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.status-icon {
    display: none;
}

.status-text {
    font-size: 11px;
}

.processing-status-badge.status-complete {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.processing-status-badge.status-in-progress {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.processing-status-badge.status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.row-actions {
    flex: 1.2;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    height: 55px;
    /* Match table row height for proper centering */
}

.action-icon-container {
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.action-icon-container:hover {
    background-color: #f0f7ff;
}

.action-icon {
    width: 20px;
    height: 20px;
    transition: opacity 0.2s ease;
}

/* Tooltip styling */
.action-icon-container::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    color: #000000;
    font-family: var(--primary-font);
    font-size: 12px;
    font-weight: var(--font-weight-medium);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.action-icon-container:hover::after {
    opacity: 1;
    visibility: visible;
}

.row-divider {
    width: 100%;
    height: 1px;
    background: #e6f1fc;
    margin: 15px 0;
    display: block;
    flex-shrink: 0;
}

/* Empty state for table */
.table-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-family: var(--primary-font);
    font-size: 14px;
}

/* Loading state for table */
.table-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-family: var(--primary-font);
    font-size: 14px;
}

/* Subtle update animation for changed rows */
.table-row.updating {
    animation: rowUpdate 0.3s ease-in-out;
}

@keyframes rowUpdate {
    0% {
        background-color: transparent;
    }

    50% {
        background-color: rgba(59, 130, 246, 0.05);
    }

    100% {
        background-color: transparent;
    }
}

/* --- Figma Edit Modal Styles --- */
.figma-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 100px 20px 20px 20px;
    box-sizing: border-box;
    will-change: opacity;
    pointer-events: auto;
}

.figma-modal-content {
    background: #ffffff;
    border-radius: 36px;
    width: 732px;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    box-shadow: 0px 20px 44px 0px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: auto;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

.figma-modal-body {
    padding: 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* File Header */
.figma-file-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.figma-file-icon-container {
    width: 36px;
    height: 36px;
    background: #f0f7ff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.figma-file-icon {
    width: 27px;
    height: 27px;
}

.figma-file-icon.word-doc {
    width: 22px;
    height: 22px;
}

.figma-file-name {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 18px;
    color: #000000;
    line-height: 1.2;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Form Section */
.figma-form-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.figma-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.figma-input-field {
    background: #ffffff;
    border: 2px solid #e7edf3;
    border-radius: 16px;
    height: 72px;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.figma-input-field:focus-within {
    border-color: #075cfb;
}

.figma-input-label {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-semibold);
    font-size: 9px;
    color: #000000;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    line-height: 1;
    margin-bottom: 8px;
}

.figma-input {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    color: #000000;
    line-height: 1;
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
}

/* Dropdown Styles */
.figma-dropdown-field {
    position: relative;
}

.figma-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 40px;
}

.figma-dropdown-arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

/* Button Group */
.figma-button-group {
    display: flex;
    gap: 24px;
    align-items: center;
}

.figma-btn-primary {
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 100px;
    height: 72px;
    padding: 0 48px;
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.figma-btn-primary:hover {
    background: #333333;
}

.figma-btn-secondary {
    background: transparent;
    color: #809dbc;
    border: 1px solid #809dbc;
    border-radius: 100px;
    height: 72px;
    padding: 0 48px;
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.figma-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #666;
    color: #666;
}

/* Legacy styles removed - using Figma modal styles only */

/* --- Small Upload Dropzone for Replace Modal --- */
.upload-dropzone-small {
    background: #f8f9fa;
    border: 2px dashed #e7edf3;
    border-radius: 12px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    margin-bottom: 20px;
}

.upload-dropzone-small.dragover {
    border-color: #075cfb;
    background: #f0f7ff;
}

.upload-icon-small {
    margin-bottom: 16px;
}

.upload-icon-small img {
    width: 24px;
    height: 24px;
}

.upload-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #666;
}

/* --- Responsive Design --- */
/* Bootstrap responsive adjustments */
@media (max-width: 1199.98px) {
    .upload-section-row {
        --bs-gutter-x: 40px;
    }
}

@media (max-width: 991.98px) {
    .upload-section-row {
        --bs-gutter-x: 30px;
    }

    .upload-dropzone-fancy,
    .recommended-documents-card {
        height: auto;
        min-height: 300px;
    }

    /* Table adjustments for tablets */
    .documents-table-section {
        overflow-x: auto;
    }
}

@media (max-width: 767.98px) {
    .vault-upload-container {
        padding: 1rem;
        padding-top: 2rem;
    }

    .upload-dropzone-fancy,
    .recommended-documents-card {
        height: auto;
        min-height: 280px;
        max-width: 100%;
    }

    .recommended-documents-card {
        padding: 32px;
    }

    /* Make table responsive on mobile */
    .documents-table {
        overflow-x: auto;
    }

    .table-headers {
        min-width: 1280px;
    }

    .table-row {
        min-width: 1280px;
    }



    .figma-modal-content {
        width: 95%;
        max-width: 732px;
        margin: 20px;
        max-height: calc(100vh - 120px);
    }

    .figma-modal-body {
        padding: 40px;
        gap: 32px;
    }

    .figma-file-header {
        gap: 16px;
    }

    .figma-file-name {
        font-size: 20px;
    }

    .figma-btn-primary,
    .figma-btn-secondary {
        height: 56px;
        padding: 0 32px;
        font-size: 14px;
    }

    .figma-button-group {
        gap: 16px;
        flex-direction: column;
    }

    .figma-button-group button {
        width: 100%;
    }
}

/* --- Figma Replace Modal Styles --- */
.figma-replace-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    will-change: opacity;
}

.figma-replace-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: auto;
}

.figma-replace-modal-content {
    position: relative;
    z-index: 1001;
    background: #ffffff;
    border-radius: 36px;
    width: 732px;
    max-width: 90vw;
    max-height: calc(100vh - 120px);
    margin: auto;
    box-shadow: 0px 20px 44px 0px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

.figma-replace-modal-inner {
    padding: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.figma-replace-title {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 24px;
    color: #000000;
    line-height: 1.2;
    text-align: center;
    margin: 0;
    width: 100%;
    max-width: 406px;
}

.figma-replace-dropzone {
    background: #ffffff;
    border: 2px dashed #e7edf3;
    border-radius: 36px;
    width: 100%;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.3s, background 0.3s;
    cursor: pointer;
    box-sizing: border-box;
    padding: 22px;
    gap: 33px;
}

.figma-replace-dropzone.dragover {
    border-color: #075cfb;
    background: #f0f7ff;
}

.figma-replace-upload-icon {
    background: #075cfb;
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.figma-replace-upload-icon img {
    width: 20px;
    height: 20px;
}

.figma-replace-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 354px;
    text-align: center;
}

.figma-replace-main-text {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    color: #000000;
    line-height: 1;
    margin: 0;
}

.figma-replace-browse {
    color: #075cfb;
    cursor: pointer;
    text-decoration: none;
}

.figma-replace-browse:hover {
    text-decoration: underline;
}

.figma-replace-sub-text {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    color: #5c777f;
    line-height: 1;
    margin: 0;
}

.figma-replace-progress {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.figma-replace-progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    color: #000000;
}

.figma-replace-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.figma-replace-progress-fill {
    height: 100%;
    background: #075cfb;
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive styles for replace modal */
@media (max-width: 900px) {
    .figma-replace-modal-content {
        width: 95%;
        margin: 20px;
        max-height: calc(100vh - 120px);
    }

    .figma-replace-modal-inner {
        padding: 40px;
        gap: 32px;
    }

    .figma-replace-dropzone {
        height: 350px;
        padding: 20px;
        gap: 24px;
    }

    .figma-replace-title {
        font-size: 20px;
        max-width: 100%;
    }

    .figma-replace-upload-text {
        width: 100%;
    }
}

/* --- Multi-Select Styles for Benefit Categories --- */
.figma-multiselect-container {
    position: relative;
    width: 100%;
}

.figma-multiselect-dropdown {
    position: relative;
    width: 100%;
}

.figma-multiselect-field {
    background: #ffffff;
    border: 2px solid #e7edf3;
    border-radius: 16px;
    height: 72px;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.figma-multiselect-field:hover {
    border-color: #075cfb;
}

.figma-multiselect-field:focus-within {
    border-color: #075cfb;
}

.figma-multiselect-value {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 16px;
    color: #000000;
    line-height: 1;
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
}

/* Style for placeholder text */
.figma-multiselect-value[style*="color: #999"] {
    color: #999 !important;
}

.figma-multiselect-field .figma-input-label {
    margin-bottom: 8px;
}

.figma-multiselect-field .figma-dropdown-arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 16px;
    height: 16px;
}

.figma-multiselect-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e7edf3;
    border-top: none;
    border-radius: 0 0 16px 16px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.figma-checkbox-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.figma-checkbox-option:hover {
    background-color: #f8f9fa;
}

.figma-checkbox-option input[type="checkbox"] {
    display: none;
}

.figma-checkbox-checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid #e7edf3;
    border-radius: 3px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.figma-checkbox-option input[type="checkbox"]:checked+.figma-checkbox-checkmark {
    background-color: #075cfb;
    border-color: #075cfb;
}

.figma-checkbox-option input[type="checkbox"]:checked+.figma-checkbox-checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.figma-checkbox-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #000;
    line-height: 1.4;
}

/* Dropdown arrow rotation when open */
.figma-multiselect-dropdown.open .figma-dropdown-arrow {
    transform: rotate(180deg);
}

.figma-dropdown-arrow {
    transition: transform 0.2s;
}

/* File Browser Overlay */
.file-browser-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    pointer-events: none;
}

/* Processing Drawer Styles */
.processing-modal {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 400px;
    height: auto;
    max-height: 600px;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px 20px 0 20px;
    box-sizing: border-box;
    pointer-events: none;
}

.processing-modal-backdrop {
    display: none;
    /* Remove backdrop for drawer style */
}

.processing-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    padding: 24px;
    width: 100%;
    max-height: 600px;
    overflow-y: auto;
    z-index: 10002;
    box-shadow: 0px -4px 24px 0px rgba(0, 0, 0, 0.12);
    will-change: transform, opacity;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    pointer-events: auto;
    border: 1px solid #e7edf3;
    border-bottom: none;
}

.processing-modal.show .processing-modal-content {
    transform: translateY(0);
}

.processing-modal-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.processing-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.processing-icon-container {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.processing-spinner {
    width: 32px;
    height: 32px;
    position: relative;
}

.spinner-ring {
    width: 32px;
    height: 32px;
    border: 3px solid #e7edf3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.processing-checkmark {
    width: 32px;
    height: 32px;
    animation: checkmark-appear 0.5s ease-out;
}

@keyframes checkmark-appear {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.processing-title {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-semibold);
    font-size: 16px;
    color: #000000;
    line-height: 1.2;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.processing-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.processing-close-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.processing-close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.processing-subtitle {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-regular);
    font-size: 12px;
    color: #5c777f;
    line-height: 1.3;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.processing-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.processing-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e7edf3;
}

.processing-file-icon {
    width: 24px;
    height: 24px;
    background: #f0f7ff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.processing-file-icon img {
    width: 16px;
    height: 16px;
}

.processing-file-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    text-align: left;
}

.processing-file-name {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-semibold);
    font-size: 14px;
    color: #000000;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.processing-file-size {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-regular);
    font-size: 12px;
    color: #5c777f;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.processing-status {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: #f0f7ff;
    border-radius: 8px;
    border: 1px solid #dbeafe;
}

.processing-status-text {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 14px;
    color: #1e40af;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.processing-status-time {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-medium);
    font-size: 12px;
    color: #6b7280;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.processing-note {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fef3c7;
    border-radius: 6px;
    border: 1px solid #fde68a;
}

.processing-note p {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-regular);
    font-size: 12px;
    color: #92400e;
    line-height: 1.3;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile responsive adjustments for processing drawer */
@media (max-width: 767.98px) {
    .processing-modal {
        width: 100%;
        padding: 10px;
    }

    .processing-modal-content {
        padding: 20px;
        border-radius: 12px 12px 0 0;
    }

    .processing-modal-inner {
        gap: 16px;
    }

    .processing-header {
        gap: 12px;
    }

    .processing-icon-container {
        width: 40px;
        height: 40px;
    }

    .processing-spinner {
        width: 28px;
        height: 28px;
    }

    .spinner-ring {
        width: 28px;
        height: 28px;
    }

    .processing-checkmark {
        width: 28px;
        height: 28px;
    }

    .processing-title {
        font-size: 14px;
    }

    .processing-subtitle {
        font-size: 11px;
    }

    .processing-file-info {
        padding: 10px;
    }

    .processing-status {
        padding: 10px;
    }

    .processing-close-btn {
        width: 20px;
        height: 20px;
    }
}

/* Document Ready Notification */
.document-ready-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.12);
    padding: 16px;
    z-index: 10003;
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
    max-width: 320px;
    border: 1px solid #e7edf3;
}

.document-ready-notification.show {
    transform: translateX(0);
}

/* Document Timeout Notification */
.document-timeout-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.12);
    padding: 16px;
    z-index: 10003;
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
    max-width: 320px;
    border: 1px solid #fecaca;
}

.document-timeout-notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 0;
}


.notification-text {
    flex: 1;
}

.notification-title {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-semibold);
    font-size: 14px;
    color: #000000;
    line-height: 1.2;
    margin-bottom: 4px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.notification-message {
    font-family: var(--primary-font);
    font-weight: var(--font-weight-regular);
    font-size: 12px;
    color: #5c777f;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile responsive adjustments for notification */
@media (max-width: 767.98px) {

    .document-ready-notification,
    .document-timeout-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(100px);
    }

    .document-ready-notification.show,
    .document-timeout-notification.show {
        transform: translateY(0);
    }
}