.modal-dialog-centered {
    display: flex;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    min-width: 500px;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 24px;
    background: linear-gradient(
        94.46deg,
        #fffeff 2.15%,
        #ecfce3 48.29%,
        #eef9e0 97.92%
    );
    border-radius: 16px 16px 0 0;
}

.modal-header .modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-body {
    padding: 20px;
}

.upload-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-info:hover {
    background-color: #f8f9fa;
}

.file-info .file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-info .file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.file-info .file-name {
    font-weight: 500;
    color: #1a1a1a;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info .file-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    display: none;
}

.file-info .file-size {
    font-size: 12px;
    color: #6b7280;
}

.file-info .file-format {
    font-size: 12px;
    color: #6b7280;
    padding: 2px 0;
    border-radius: 4px;
}

.file-info .file-actions {
    display: none;
    gap: 12px;
    flex-direction: row;
    align-items: center;
}

.file-info .file-actions.show {
    display: flex !important;
}

.file-actions button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-actions button:hover {
    background: #e2e8f0;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.caption-input label {
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.2px;
}

.input-with-emoji {
    display: flex;
    align-items: center;
    border: 1px solid #5e718d;
    border-radius: 8px;
    padding: 8px 12px;
    background: white;
}

.input-with-emoji input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 4px 0;
    caret-color: #009900;
}

.input-with-emoji input::placeholder {
    font-size: 14px;
}

.input-with-emoji .emoji-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-footer-upload-file {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.2s;
}

.btn-secondary {
    background: white;
    border: 1px solid #e2e8f0;
    color: #1a1a1a;
}

.btn-secondary:hover {
    background: #f8f9fa;
}

.btn-primary {
    background: #3b82f6;
    border: 1px solid #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.emoji-btn::before {
    content: "";
    display: block;
    height: 24px;
    width: 1px;
    background: #e2e8f0;
    margin-right: 8px;
}

.modal-footer-upload-file button {
    font-weight: 600;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    border: none;
    background: none;
    color: #009900;
}

.preview-wrapper {
    position: relative;
}

.preview-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 16px;
    padding: 8px;
    background: #0000004d;
    border-radius: 4px;
}

.preview-actions button {
    background: transparent;
    outline: none;
    border: none;
    cursor: pointer;
}

.modal-dialog-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: #9999994d;
    color: #00a656;
    border-radius: 8px;
    display: none;
}
.modal-dialog-loading.open {
    display: flex;
}

@media all and (max-width: 768px) {
    .modal-content {
        min-width: initial;
        width: 96vw;
    }

    .modal-content .preview-wrapper {
        width: auto !important;
    }
}
