
#dp-media-upload {
    border: 1px solid #ddd;
    padding: 15px;
    min-width: 200px;
	max-width: 980px;
	background: #f9f9f9;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}


.dp-controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 auto 16px;
    width: 100%;
}

.dp-controls-bottom {
    margin: 18px auto 0;
    display: none;
}

.dp-controls-bottom.dp-controls-visible {
    display: flex;
}

.dp-controls button {
    width: 150px;
    height: 48px;
    padding: 6px 10px;
    background-color: #004885;
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: none !important;
}

.dp-controls button:hover {
    background-color: #FF6600;
}

.dp-controls button img {
    width: 20px;
    height: 20px;
    filter: brightness(100%) invert(100%);
}

.dp-controls button span {
    display: inline-block;
    color: #ffffff;
    font-weight: 500;
    white-space: nowrap;
}

.dp-media-upload-info {
    margin: 8px auto 0;
    max-width: 520px;
    text-align: center;
}

.dp-media-upload-info-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: #004885;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 8px;
}

.dp-media-upload-info-toggle:hover,
.dp-media-upload-info-toggle:focus {
    color: #003765;
    outline: none;
    text-decoration: underline;
}

.dp-media-upload-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #004885;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.dp-media-upload-info-panel {
    margin: 8px auto 0;
    padding: 10px 12px;
    border: 1px solid #d8e4f0;
    border-radius: 10px;
    background: #f7fbff;
    color: #234;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
}

.dp-media-upload-info-panel p {
    margin: 0 0 6px;
    font-weight: 700;
}

.dp-media-upload-info-panel ul {
    margin: 0;
    padding-left: 18px;
}

.dp-media-upload-info-panel li {
    margin: 2px 0;
}

#dp-upload-status {
    font-size: 14px;
    color: #000050 !important;
    margin-top: 12px;
    margin-bottom: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.dp-mda-debug-panel {
    margin: 12px auto;
    max-width: 760px;
    border: 1px solid #bfd4e8;
    border-radius: 6px;
    background: #ffffff;
    color: #17324d;
    font-size: 12px;
    line-height: 1.45;
    overflow: hidden;
}

.dp-mda-debug-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    background: #eef6ff;
    color: #004885;
}

.dp-mda-debug-head span {
    color: #42617e;
    font-weight: 600;
}

.dp-mda-debug-body {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    font-family: Consolas, Monaco, monospace;
    word-break: break-word;
}

.dp-mda-debug-body div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.dp-mda-debug-body div:first-child {
    display: block;
    padding-bottom: 4px;
    border-bottom: 1px solid #e6eef6;
    font-family: 'Roboto', sans-serif;
}

#dp-preview-area {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 18px;
    align-items: stretch;
}

.dp-preview-item {
    position: relative;
    padding: 40px;
	padding-bottom: 88px;
    background: #fff !important;
    border: 1px solid #D3D3D3;
    border-radius: 5px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-height: 300px;
	max-height: 600px;
	margin-bottom: 20px;
    flex: 0 0 calc((100% - 36px) / 3);
    width: calc((100% - 36px) / 3);
    max-width: calc((100% - 36px) / 3);
    box-sizing: border-box;
    transition: max-height 0.3s ease;
}

.dp-preview-item p {
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.dp-preview-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef6ff;
    color: #004885;
    font-size: 12px;
    font-weight: 700;
}

.dp-preview-item.is-processing .dp-preview-status {
    background: #fff5e8;
    color: #a85600;
}

.dp-preview-item.is-failed .dp-preview-status {
    background: #fff0f0;
    color: #b00020;
}

.dp-preview-number {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    background: #FF6600;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.dp-sort-placeholder {
    min-height: 120px;
    border: 2px dashed #FF6600;
    border-radius: 5px;
    background: rgba(255, 102, 0, 0.08);
    margin-bottom: 20px;
}

.dp-preview-item.rotated-vertical {
    min-height: 300px;
	max-height: 500px;
}

.dp-preview-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    border: 1px solid #ccc;
    transition: transform 0.3s ease;
    object-fit: contain;
    margin-top: 45px;
    margin-bottom: 15px;
}

.dp-preview-actions {
    display: flex;
    flex-direction: row;
    gap: 25px;
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    justify-content: center;
    align-items: center;
}

.dp-delete-btn,
.dp-rotate-btn {
    height: 40px;
	width: 40px;
	background-color: #004885;
    border: none;
    border-radius: 5px !important;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
	box-shadow: none !important;
    transition: background-color 0.2s ease;
}

.dp-delete-btn:hover,
.dp-rotate-btn:hover {
    background-color: #FF6600;
}

.dp-zoom-btn:hover {
    background-color: #FF6600;
}

.dp-delete-icon {
    width: 18px;
    height: 18px;
    display: block;
    object-fit: contain;
    margin: 0;
    filter: brightness(100%) invert(100%);
    transition: filter 0.2s ease;
}

.dp-pdf-preview-canvas {
    width: 100%;
    max-width: 260px;
    height: 300px;
    background: #f8f8f8;
    object-fit: contain;
}

.dp-pdf-preview-fallback {
    width: 100%;
    max-width: 260px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f8f8f8;
    color: #004885;
}

#dp-pdf-viewer-modal {
    display: none;
}

#dp-pdf-viewer-modal .dp-pdf-dialog {
    position: relative;
    width: min(94vw, 1100px);
    height: 86vh;
    max-height: 86vh;
    padding: 48px 18px 76px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

#dp-pdf-page-info {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: #004885;
    font-weight: 700;
}

#dp-pdf-canvas-wrapper {
    width: 100%;
    height: calc(86vh - 140px);
    overflow: auto;
    display: block;
    text-align: center;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

#dp-pdf-canvas-wrapper.dp-pdf-is-panning {
    cursor: grabbing;
}

#dp-pdf-canvas {
    max-width: none;
    max-height: none;
    height: auto;
    background: #f8f8f8;
    border-radius: 6px;
    display: inline-block;
}

#dp-pdf-controls-top {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

#dp-pdf-controls-top button,
.dp-pdf-side-btn {
    width: 44px;
    height: 44px;
    background: #004885;
    border: none;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#dp-pdf-controls-top button:hover,
.dp-pdf-side-btn:hover {
    background: #FF6600;
}

#dp-pdf-controls-top img,
.dp-pdf-side-btn img {
    width: 22px;
    height: 22px;
    filter: brightness(100%) invert(100%);
}

#dp-pdf-controls-sides {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.dp-pdf-side-btn {
    pointer-events: auto;
}

@media (max-width: 768px) {
    #dp-pdf-viewer-modal .dp-pdf-dialog {
        width: 96vw;
        height: 88vh;
        max-height: 88vh;
        padding: 44px 10px 70px;
    }

    #dp-pdf-canvas-wrapper {
        height: calc(88vh - 130px);
    }

    #dp-pdf-controls-top {
        bottom: 14px;
        gap: 12px;
    }

    #dp-pdf-controls-top button,
    .dp-pdf-side-btn {
        width: 40px;
        height: 40px;
    }

    #dp-pdf-controls-sides {
        left: 4px;
        right: 4px;
    }
}

@media (max-width: 480px) {
    #dp-pdf-viewer-modal .dp-pdf-dialog {
        width: 98vw;
        height: 90vh;
        max-height: 90vh;
        padding: 42px 8px 66px;
    }

    #dp-pdf-canvas-wrapper {
        height: calc(90vh - 124px);
    }

    #dp-pdf-page-info {
        font-size: 13px;
        white-space: nowrap;
    }

    #dp-pdf-controls-top button,
    .dp-pdf-side-btn {
        width: 38px;
        height: 38px;
    }

    #dp-pdf-controls-top img,
    .dp-pdf-side-btn img {
        width: 19px;
        height: 19px;
    }
}

.dp-spinner {
    display: inline-block;
    margin-left: 6px;
    font-size: 16px;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

.dp-cropper-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 18px;
    box-sizing: border-box;
}

.dp-cropper-dialog {
    position: relative;
    width: min(96vw, 980px);
    height: min(90vh, 760px);
    background: #fff;
    padding: 14px;
    border-radius: 10px;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    overflow: hidden;
    box-sizing: border-box;
}

.dp-cropper-stage {
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
}

#dp-cropper-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.dp-cropper-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #e1e5ea;
    box-sizing: border-box;
}

.dp-cropper-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    font-size: 16px;
    background: #004885;
    color: white !important;
    border: none;
    box-shadow: none !important;
    border-radius: 5px !important;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.dp-cropper-controls .dp-cropper-text-btn {
    width: auto;
    min-width: 68px;
    padding: 0 14px;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dp-cropper-controls button img {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0;
    object-fit: contain;
    filter: brightness(100%) invert(100%);
    transition: filter 0.2s ease;
}

#dp-cropper-rotate-left img {
    transform: scaleX(-1);
}

.dp-cropper-controls button:hover,
.dp-cropper-controls button:focus {
    background-color: #FF6600;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.dp-camera-dialog {
    position: relative;
    width: min(96vw, 980px);
    height: min(90vh, 760px);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 2;
}

.dp-camera-stage {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #0e1f30;
    overflow: hidden;
    position: relative;
}

#dp-camera-video,
#dp-camera-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.dp-camera-message {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: #16324d;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.dp-camera-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dp-camera-text-btn {
    min-width: 120px;
    height: 44px;
    border: 1px solid #004885;
    border-radius: 8px;
    background: #004885;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 0 16px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.dp-camera-text-btn:hover,
.dp-camera-text-btn:focus {
    background: #FF6600;
    border-color: #FF6600;
}

@media (max-width: 600px) {
  #dp-media-upload {
    max-width: 100%;
  }

  #dp-preview-area {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .dp-preview-item {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    max-height: none;
    margin-bottom: 0;
  }

  .dp-controls {
    justify-content: center;
    gap: 8px;
  }

  .dp-controls button {
    width: auto;
    min-width: 94px;
    height: 40px;
    padding: 6px 8px;
    gap: 5px;
    font-size: 12px;
  }

  .dp-controls button img {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }

  .dp-controls button span {
    line-height: 1.1;
    white-space: normal;
  }

  .dp-cropper-modal {
    padding: 8px;
  }

  .dp-cropper-dialog {
    width: 98vw;
    height: 90vh;
    padding: 10px;
    gap: 8px;
  }

  .dp-cropper-controls {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 4px 2px;
  }

  .dp-cropper-controls button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
  }

  .dp-cropper-controls .dp-cropper-text-btn {
    min-width: 58px;
    padding: 0 10px;
    font-size: 12px;
  }

  .dp-cropper-controls button img {
    width: 18px;
    height: 18px;
  }

  .dp-camera-dialog {
    width: 98vw;
    height: 90vh;
    padding: 10px;
  }

  .dp-camera-controls {
    gap: 8px;
  }

  .dp-camera-text-btn {
    min-width: 100px;
    height: 40px;
    font-size: 13px;
    padding: 0 12px;
  }
}
