/* Reference Box Section Styles */
/* Based on Figma design node-id: 7774-325720 */

/* Container */
#the-reference {
    margin-bottom: var(--spacing-l, 24px);
    background-color: transparent;
}

.reference-header:hover {
    background-color: #C9E6FF !important;
    transition: background-color 0.3s ease;
}

/* Header Section */
.reference-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #C9E6FF;
}

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

/* Title */
.reference-title {
    font-weight: 700;
    font-size: 14px;
    line-height: normal;
    color: #313131;
}

/* Help Icon */
.reference-help-icon {
    width: 20px;
    height: 20px;
}

/* Description Text */
.reference-description {
    font-weight: 400;
    font-size: 12px;
    line-height: 1;
    color: #626263;
}

/* Default Upload Holder Area */
/* Based on Figma design node-id: 7774-324488 */
#default-upload-holder:not(.upload-reference-bilingual-and-target) {
    background-color: #FFF;
    border: 2px dashed #1763A2;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 132px;
}

.upload-reference-bilingual-and-target{
    height: 132px;
    width: 100%;
    justify-content: space-between;
}
.upload-reference-bilingual-and-target > div:first-child,
.upload-reference-bilingual-and-target > div:last-child{
    width: 204px;
    height: 132px;
    background-color: #FFF;
    border: 2px dashed #1763A2;
    border-radius: 8px;
    padding: 12px 4px 20px 4px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 12px;
}

.upload-reference-bilingual-and-target > div:first-child:hover,
.upload-reference-bilingual-and-target > div:last-child:hover{
  background-color: #EEF7FF;
}

.upload-reference-bilingual-and-target .reference-title{
    font-size: 14px;
    font-weight: 700;
    line-height: normal;
    color: #1763A2;
    text-align: center;
    width: 100%;
    height: 38px;
    line-height: 19px;
}

.upload-reference-bilingual-and-target > div:first-child > .tw-gap-s,
.upload-reference-bilingual-and-target > div:last-child > .tw-gap-s {
    column-gap: 0;
    width: 100%;
    position: relative;
    top: -8px;
}

.upload-reference-bilingual-and-target .upload-file-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.upload-reference-bilingual-and-target .upload-info-list li {
    margin-bottom: 8px;
}

.upload-reference-bilingual-and-target .reference-divider {
    color: #717172;
    font-size: 14px;
}

#default-upload-holder:not(.upload-reference-bilingual-and-target):hover {
    background-color: #EEF7FF;
}

/* Disabled state for default upload holder */
#default-upload-holder:not(.upload-reference-bilingual-and-target).disabled {
    background-color: #F2F3F5;
    border: none;
    pointer-events: none;
    cursor: not-allowed;
}

.upload-reference-bilingual-and-target.disabled div:first-child,
.upload-reference-bilingual-and-target.disabled div:last-child{
    background-color: #F2F3F5;
    border: none;
    pointer-events: none;
    cursor: not-allowed;
}

/* Prevent hover effect when disabled */
#default-upload-holder:not(.upload-reference-bilingual-and-target).disabled:hover {
    background-color: #F2F3F5;
}

/* Change icon when disabled */
#default-upload-holder:not(.upload-reference-bilingual-and-target).disabled .upload-file-icon {
    content: var(--bilingual-disable-icon);
}

.upload-reference-bilingual-and-target.disabled > div:first-child .upload-file-icon{
    content: var(--bilingual-disable-icon);
}
.upload-reference-bilingual-and-target.disabled > div:last-child .upload-file-icon{
    content: url('/_common/images/member/v1/rztapp/translate_file/reference_target_document_disable.svg');
}

/* Change text colors when disabled */
#default-upload-holder.disabled .upload-main-text {
    color: #C0C5D0;
}

#default-upload-holder.disabled .upload-text-highlight {
    color: #C0C5D0;
}

#default-upload-holder.disabled .upload-info-list {
    color: #C0C5D0;
}

/* File Icon Container */
.upload-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Text Content Container */
.upload-text-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

/* Main Text */
.upload-main-text {
    font-weight: 400;
    font-size: 14px;
    line-height: 100%;
    height: 19px;
    color: #313131;
    margin: 0;
    padding-top: 4px;
}

.upload-text-highlight {
    font-weight: 700;
    color: #1763A2;
}

/* Info List */
.upload-info-list {
    margin: 0;
    padding-left: 8px;
    list-style: none;
    font-weight: 400;
    font-size: 12px;
    line-height: 100%;
    color: #313131;
}

.upload-info-list li {
    position: relative;
    padding-left: 11px;
    margin-bottom: 8px;
}

.upload-info-list li:last-child {
    margin-bottom: 0;
}

.upload-info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    font-weight: 400;
}

/* Drag & Drop Upload Area */
.drag-drop-area {
    background-color: #eef7ff;
    background-image: url('data:image/svg+xml,%3Csvg width=%27100%25%27 height=%27100%25%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Crect width=%27100%25%27 height=%27100%25%27 fill=%27none%27 rx=%278%27 ry=%278%27 stroke=%27%231763a2%27 stroke-width=%271%27 stroke-dasharray=%278,4%27/%3E%3C/svg%3E');
    border-radius: 8px;
    padding: 16px;
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 42px;
    overflow: clip;
    position: relative;
    height: 128px;
}

/* Disabled state for drag-drop area */
.drag-drop-area.disabled {
    pointer-events: none;
}

/* Dropzone drag hover states - Using custom class on wrapper */
#upload-areas-wrapper.dz-drag-hover #default-upload-holder {
    display: none !important;
}

#upload-areas-wrapper.dz-drag-hover .drag-drop-area {
    display: flex !important;
}

/* Text and Arrow Container */
.drag-drop-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    /* width: 140px; */
}

/* Drag Drop Text */
.drag-drop-text {
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    line-height: 32px;
    color: #1763a2;
    min-width: 100%;
    position: relative;
    flex-shrink: 0;
    white-space: pre-wrap;
}

/* Arrow Container */
.drag-drop-arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

/* Arrow Rotation Wrapper */
.drag-drop-arrow-wrapper {
    flex: none;
    transform: rotate(270deg);
}

/* Arrow SVG */
.drag-drop-arrow-svg {
    overflow: clip;
    position: relative;
    width: 24px;
    height: 24px;
}

/* CSV Icon Container */
.drag-drop-csv-icon {
    position: absolute;
    left: 64px;
    top: 44px;
    width: 44px;
    height: 46px;
}

.drag-drop-csv-icon img {
    width: 100%;
    height: 100%;
}

/* File List Styles */
#preview-reference-file {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs, 4px);
    background-color: #FFF;
    padding: var(--Spacing-XS, 4px) var(--Spacing-M, 16px);
    justify-content: center;
    align-items: center;
    align-self: stretch;
    /* Success state styling */
    border: 1px solid #C0C5D0;
    border-radius: 8px;
    height: 66px;
}

/* Disabled state for preview area */
#preview-reference-file.disabled {
    background-color: #F2F3F5;
    pointer-events: none;
}

/* File Card */
.reference-file-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    padding: var(--spacing-s, 8px);
    padding-left: 0;
    padding-right: var(--spacing-s, 8px);
    width: 100%;
}

.reference-file-card-content {
    display: flex;
    flex: 1;
    gap: var(--spacing-xs, 4px);
    align-items: flex-start;
    min-width: 0;
    width: 100%;
}

.reference-file-card-row {
    display: flex;
    flex: 1;
    gap: var(--spacing-l, 24px);
    align-items: center;
    min-width: 0;
    padding-left: 10.5px;
}

.reference-file-card-title {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0;
    min-width: 0;
}

/* Bullet Point Icon */
.reference-file-bullet {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-s, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.reference-file-bullet::before {
    content: '・';
    font-size: 16px;
    color: #313131;
    font-weight: bold;
    line-height: 1;
}

/* File Name */
.reference-file-name {
    font-size: 14px;
    line-height: normal;
    color: #1763A2;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}

/* Delete Button */
.reference-file-delete {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-s, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: opacity 0.2s ease;
}

.reference-file-delete:hover {
    opacity: 0.7;
}

.reference-file-delete svg {
    width: 12px;
    height: 12px;
}

/* Progress Gauge */
.reference-file-gauge {
    display: flex;
    height: 6px;
    width: 100%;
    background-color: #e0e0e0;
    overflow: hidden;
}

.reference-file-gauge-progress {
    height: 100%;
    background-color: #1763A2;
    transition: width 0.3s ease;
}

/* Error Message View */
/* Based on Figma design node-id: 7774-326020 */

#reference-file-error-message {
    display: none;
    position: relative;
    background-color: #F2F3F5;
    border: 2px dashed #C90012;
    border-radius: 8px;
    padding: 24px 24px;
    gap: 8px;
    align-items: center;
    height: 66px;
}

.reference-file-error-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reference-file-error-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

#reference-file-error-text {
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    color: #C90012;
    margin: 0;
    flex: 1;
}

.reference-file-error-close {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.reference-file-error-close:hover {
    opacity: 0.7;
}

.used-reference-file-card {
    height: 87px;
    background-color: #FFFFFF;
    margin-bottom: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}