.docphoto2-online-tool {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1f2937;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.docphoto2-header {
    margin-bottom: 24px;
    text-align: center;
}

.docphoto2-header h2 {
    margin: 0;
    font-size: 2rem;
    background: linear-gradient(135deg, #267DAB, #29A4E4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docphoto2-header p {
    margin: 8px 0 0;
    color: #4b5563;
    max-width: 100%;
    text-align: center;
}

/* Quick Info Bar */
.docphoto2-info-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(38, 125, 171, 0.08), rgba(41, 164, 228, 0.08));
    border-radius: 14px;
    border: 1px solid rgba(38, 125, 171, 0.2);
    backdrop-filter: blur(10px);
}

.docphoto2-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px;
    background: linear-gradient(135deg, rgba(38, 125, 171, 0.08), rgba(41, 164, 228, 0.08));
    border-radius: 14px;
    border: 1px solid rgba(38, 125, 171, 0.2);
    backdrop-filter: blur(10px);
}

.docphoto2-info-label {
    font-weight: 600;
    color: #267DAB;
    font-size: 0.9rem;
}

.docphoto2-info-value {
    font-weight: 700;
    color: #1f2937;
    font-size: 1rem;
}

.docphoto2-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 24px;
}

.docphoto2-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(38, 125, 171, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(38, 125, 171, 0.1);
    padding: 20px;
}

.docphoto2-card-source {
    grid-column: span 1;
}

.docphoto2-card-result {
    grid-column: span 1;
}

.docphoto2-card-settings {
    grid-column: span 2;
}

.docphoto2-card-header {
    border-bottom: 2px solid rgba(38, 125, 171, 0.15);
    margin-bottom: 18px;
    padding-bottom: 12px;
}

.docphoto2-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #267DAB;
}

.docphoto2-dropzone {
    position: relative;
    min-height: 220px;
    border: 2px dashed #29A4E4;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    background: linear-gradient(135deg, rgba(41, 164, 228, 0.08), rgba(38, 125, 171, 0.08));
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.docphoto2-dropzone:hover,
.docphoto2-dropzone.dragover {
    background: linear-gradient(135deg, rgba(41, 164, 228, 0.12), rgba(38, 125, 171, 0.12));
    border-color: #267DAB;
}

.docphoto2-dropzone-content {
    text-align: center;
    padding: 22px;
}

.docphoto2-dropzone-content p {
    margin: 0 0 12px;
    font-weight: 600;
    color: #267DAB;
}

.docphoto2-choose-button {
    border: none !important;
    background: linear-gradient(135deg, #267DAB, #29A4E4) !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(38, 125, 171, 0.3) !important;
}

.docphoto2-choose-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(38, 125, 171, 0.4) !important;
}

.docphoto2-box {
    margin-top: 20px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(241, 245, 249, 0.5);
    backdrop-filter: blur(5px);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(38, 125, 171, 0.1);
}

.docphoto2-box-preview img,
.docphoto2-box-result-preview img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 420px;
    text-align: center;
}

.docphoto2-box-preview img:not(.loaded),
.docphoto2-box-result-preview img:not(.loaded) {
    display: none;
}

.docphoto2-box-result-preview {
    min-height: 420px;
    position: relative;
}

.docphoto2-result-empty {
    color: #6b7280;
    text-align: center;
    font-size: 0.95rem;
    padding: 32px;
}

.docphoto2-download-button {
    width: 100%;
    margin-top: 18px;
    border: none !important;
    background: linear-gradient(135deg, #267DAB, #29A4E4) !important;
    color: #ffffff !important;
    padding: 14px 18px !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(38, 125, 171, 0.3) !important;;
}

.docphoto2-download-button:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.docphoto2-download-button:not(:disabled):hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(38, 125, 171, 0.4) !important;
}

.docphoto2-hint {
    margin-top: 12px;
    color: #6b7280;
    font-size: 0.95rem;
    text-align: center;
}

/* Metadata Display */
.docphoto2-metadata {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(38, 125, 171, 0.05);
    border-radius: 10px;
    border-left: 3px solid #29A4E4;
}

.docphoto2-metadata-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.9rem;
}

.docphoto2-metadata-label {
    font-weight: 600;
    color: #267DAB;
}

.docphoto2-metadata-value {
    color: #1f2937;
    word-break: break-word;
}

.docphoto2-field-group {
    margin-bottom: 20px;
}

.docphoto2-field-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #1f2937;
}

.docphoto2-slider-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
}

#docphoto2-quality-slider {
    width: 100%;
    accent-color: #29A4E4;
}

#docphoto2-quality-value {
    min-width: 56px;
    text-align: right;
    font-weight: 700;
    color: #267DAB;
}

#docphoto2-crop-mode {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(38, 125, 171, 0.3);
    padding: 10px 12px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.8);
    color: #1f2937;
}

.docphoto2-accordion {
    border: 1px solid rgba(38, 125, 171, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.docphoto2-accordion-button {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, rgba(38, 125, 171, 0.1), rgba(41, 164, 228, 0.1));
    color: #267DAB;
    padding: 12px 16px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.docphoto2-accordion-button:hover {
    background: linear-gradient(135deg, rgba(38, 125, 171, 0.15), rgba(41, 164, 228, 0.15));
}

.docphoto2-accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.docphoto2-accordion-panel {
    padding: 16px 16px;
    background: rgba(255, 255, 255, 0.8);
    color: #4b5563;
    line-height: 1.65;
    border-top: 1px solid rgba(38, 125, 171, 0.1);
}

/* Information Accordions Section */
.docphoto2-accordions {
    margin-top: 32px;
    display: grid;
    gap: 12px;
}

.docphoto2-accordion-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(38, 125, 171, 0.15);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(38, 125, 171, 0.1);
}

.docphoto2-accordion-item .docphoto2-accordion-button {
    background: linear-gradient(135deg, #267DAB, #29A4E4);
    color: #ffffff;
    padding: 14px 18px;
}

.docphoto2-accordion-item .docphoto2-accordion-button:hover {
    background: linear-gradient(135deg, rgba(38, 125, 171, 0.9), rgba(41, 164, 228, 0.9));
}

.docphoto2-accordion-title {
    font-size: 1rem;
}

.docphoto2-accordion-item .docphoto2-accordion-panel {
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    padding: 18px 18px;
}

.docphoto2-accordion-section {
    margin-bottom: 14px;
}

.docphoto2-accordion-section h4 {
    margin: 0 0 10px;
    color: #267DAB;
    font-weight: 700;
    font-size: 0.95rem;
}

.docphoto2-accordion-section ul {
  list-style: none; /* Убираем стандартные точки */
  padding-left: 0;
}

.docphoto2-accordion-section ul li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  color: #333;
  transition: transform 0.2s ease;
}

.docphoto2-accordion-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px; /* Центрируем по высоте строки */
  width: 12px;
  height: 2px;
  background: #4bb3fd; /* Голубой акцент */
  border-radius: 2px;
}

/* Crop Editor Styles */
.docphoto2-crop-editor {
    margin-bottom: 20px;
}

.docphoto2-crop-container {
    position: relative;
    width: 100%;
    max-width: 325px; /* Scale 684px to fit */
    height: 420px;
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(241, 245, 249, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(38, 125, 171, 0.1);
}

#docphoto2-crop-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

#docphoto2-crop-canvas:active {
    cursor: grabbing;
}

.docphoto2-crop-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid #007bff;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 10;
}

.docphoto2-crop-overlay {
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
}

.docphoto2-crop-overlay-top {
    top: 0;
    left: 0;
    right: 0;
    bottom: 66.67%;
}

.docphoto2-crop-overlay-bottom {
    top: 66.67%;
    left: 0;
    right: 0;
    bottom: 0;
}

.docphoto2-crop-overlay-left {
    top: 33.33%;
    left: 0;
    right: 66.67%;
    bottom: 33.33%;
}

.docphoto2-crop-overlay-right {
    top: 33.33%;
    left: 66.67%;
    right: 0;
    bottom: 33.33%;
}

.docphoto2-crop-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.docphoto2-crop-grid-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
}

.docphoto2-crop-grid-horizontal-1 {
    top: 33.33%;
    left: 0;
    width: 100%;
    height: 1px;
}

.docphoto2-crop-grid-horizontal-2 {
    top: 66.67%;
    left: 0;
    width: 100%;
    height: 1px;
}

.docphoto2-crop-grid-vertical-1 {
    top: 0;
    left: 33.33%;
    width: 1px;
    height: 100%;
}

.docphoto2-crop-grid-vertical-2 {
    top: 0;
    left: 66.67%;
    width: 1px;
    height: 100%;
}

.docphoto2-control-panel {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.docphoto2-control-btn {
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: linear-gradient(135deg, #267DAB, #29A4E4) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    font-weight: bold !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(38, 125, 171, 0.3) !important;
}

.docphoto2-control-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(38, 125, 171, 0.4) !important;
}

.docphoto2-control-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(38, 125, 171, 0.3) !important;
}

.docphoto2-control-icon {
    line-height: 1 !important;
}

.docphoto2-accordion-section ul li:hover {
  transform: translateX(5px); /* Легкий интерактив при наведении */
}

.docphoto2-accordion-section p {
    margin: 0 0 10px;
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .docphoto2-grid {
        grid-template-columns: 1fr 1fr;
    }

    .docphoto2-card-source {
        grid-column: span 1;
    }

    .docphoto2-card-result {
        grid-column: span 1;
    }

    .docphoto2-card-settings {
        grid-column: span 2;
    }

    .docphoto2-info-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .docphoto2-online-tool {
        padding: 16px;
    }

    .docphoto2-header h2 {
        font-size: 1.5rem;
    }

    .docphoto2-grid {
        grid-template-columns: 1fr;
    }

    .docphoto2-card {
        padding: 16px;
    }

    .docphoto2-card-source {
        grid-column: span 1;
    }

    .docphoto2-card-result {
        grid-column: span 1;
    }

    .docphoto2-card-settings {
        grid-column: span 1;
    }

    .docphoto2-box-result-preview,
    .docphoto2-box {
        min-height: 220px;
    }

    .docphoto2-info-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .docphoto2-info-item {
        flex-direction: inherit;
        align-items: center;
        gap: 4px;
        padding: 10px 10px;
    }
}

@media (max-width: 480px) {
    .docphoto2-online-tool {
        padding: 12px;
    }

    .docphoto2-header h2 {
        font-size: 1.25rem;
    }

    .docphoto2-header p {
        font-size: 0.9rem;
    }

    .docphoto2-card {
        padding: 12px;
    }

    .docphoto2-info-bar {
        grid-template-columns: 1fr;
    }

    .docphoto2-metadata {
        margin-top: 12px;
        padding: 10px 12px;
    }

    .docphoto2-metadata-row {
        font-size: 0.85rem;
    }
}
