/* Public free-tools workspace. Namespaced dwd-tools- so it never collides
   with marketing or CTA styles. Document look is shared with dwd-tools-pdf.css. */

.dwd-tools-hero {
    padding-bottom: 48px;
}

.dwd-tools-workspace {
    padding: 36px 0 64px;
    background: #f4f6f8;
}

.dwd-tools-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 22px;
    align-items: start;
}

.dwd-tools-form-col {
    background: #fff;
    border: 1px solid #eaecef;
    border-radius: 16px;
    padding: 22px;
}

.dwd-tools-form-col h2 {
    font-size: 16px;
    margin: 0 0 14px;
}

.dwd-tools-section {
    margin-bottom: 22px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f2f4;
}

.dwd-tools-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
}

.dwd-tools-lines {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 10px;
}

.dwd-tools-lines th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6b7280;
    padding: 6px 4px;
}

.dwd-tools-lines td {
    padding: 4px;
    vertical-align: top;
}

.dwd-tools-lines input,
.dwd-tools-lines select {
    width: 100%;
    padding: 8px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    background: #f9fafb;
}

.dwd-tools-lines .dwd-tools-remove {
    border: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
}

.dwd-tools-lines .dwd-tools-remove:hover {
    color: #ef4444;
}

.dwd-tools-add {
    background: none;
    border: 1px dashed #cdd5de;
    color: #0a4064;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    width: 100%;
}

.dwd-tools-add:hover {
    background: #f4f7fa;
}

.dwd-tools-add:disabled {
    opacity: 0.55;
    cursor: default;
    background: #f8fafc;
}

.dwd-tools-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.dwd-tools-form-actions .dwd-btn-primary,
.dwd-tools-form-actions .dwd-btn-secondary {
    padding: 12px 20px;
    font-size: 14px;
}

.dwd-tools-optional {
    font-weight: 500;
    color: #6b7280;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    margin-left: 6px;
}

.dwd-logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dwd-logo-thumb {
    width: 76px;
    height: 76px;
    border: 1px dashed #cdd5de;
    border-radius: 10px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.dwd-logo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dwd-logo-clear {
    margin-left: 8px;
    background: none;
    border: 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
}

.dwd-logo-clear:hover {
    color: #ef4444;
}

.dwd-tools-privacy {
    margin: 12px 0 0;
    font-size: 12.5px;
    color: #6b7280;
}

.dwd-logo-row .dwd-tools-privacy {
    margin-top: 6px;
}

.dwd-photo-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dwd-photo-slot {
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    padding: 12px;
    background: #fafbfc;
}

.dwd-photo-upload-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #374151;
    margin-bottom: 8px;
}

.dwd-photo-upload-label span {
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #6b7280;
    font-size: 12px;
}

.dwd-photo-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 80px;
    margin-bottom: 8px;
}

.dwd-photo-empty-hint {
    font-size: 12.5px;
    color: #9ca3af;
    align-self: center;
    padding: 8px 4px;
}

.dwd-photo-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.dwd-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dwd-photo-thumb button {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    cursor: pointer;
    padding: 0;
}

@media (max-width: 980px) {
    .dwd-photo-upload-grid {
        grid-template-columns: 1fr;
    }
}

.dwd-tools-preview-col {
    background: #e8edf2;
    border: 1px solid #dce3ea;
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 96px;
}

.dwd-tools-preview-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #0a4064;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.dwd-tools-preview-actions {
    display: flex;
    gap: 8px;
}

.dwd-tools-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    cursor: pointer;
}

.dwd-tools-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dwd-tools-preview-scroll {
    max-height: calc(100vh - 180px);
    overflow: auto;
    padding: 16px;
}

.dwd-tools-preview-frame {
    background: #fff;
    min-height: 420px;
    box-shadow: 0 8px 24px rgba(15, 30, 44, 0.08);
}

.dwd-tools-preview-frame .dwd-doc {
    transform-origin: top center;
}

.dwd-tools-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.dwd-tools-hub-card .dwd-mkt-feature-icon {
    margin-bottom: 14px;
}

.dwd-tools-hub-card p {
    min-height: 72px;
}

.dwd-tools-hub-meta {
    font-size: 12.5px;
    font-weight: 700;
    color: #0a4064;
    margin-top: 12px;
}

.dwd-tools-soon {
    opacity: 0.72;
    pointer-events: none;
}

.dwd-tools-soon .dwd-tools-hub-meta {
    color: #6b7280;
}

.dwd-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    margin: 8px 0 0;
}

.dwd-check-row input {
    width: 16px;
    height: 16px;
}

#dwd-tool-pdf[disabled],
#dwd-tool-csv[disabled] {
    opacity: 0.65;
    cursor: wait;
}

@media (max-width: 980px) {
    .dwd-tools-grid,
    .dwd-tools-hub-grid {
        grid-template-columns: 1fr;
    }

    .dwd-tools-preview-col {
        position: static;
    }

    .dwd-tools-preview-scroll {
        max-height: none;
    }

    .dwd-tools-lines {
        display: block;
        overflow-x: auto;
    }
}

@media print {
    .dwd-navbar,
    .dwd-mkt-hero,
    .dwd-tools-form-col,
    .dwd-tools-preview-bar,
    .dwd-mkt-excel-section,
    .dwd-mkt-section,
    .dwd-mkt-footer,
    .dwd-cta-group,
    .dwd-mkt-internal-links,
    .dwd-mobile-cta-bar,
    .dwd-wa-btn {
        display: none !important;
    }

    .dwd-tools-workspace,
    .dwd-tools-preview-col,
    .dwd-tools-preview-scroll,
    .dwd-tools-preview-frame {
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        position: static !important;
    }
}
