/**
 * Scoped GPJAM Tools Suite Styles.
 * Integrates cleanly with WordPress themes (GeneratePress, Astra, Twenty Twenty, etc.).
 */

.gpjam-suite {
    max-width: 860px;
    margin: 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #0b132b;
    box-sizing: border-box;
}

.gpjam-suite * {
    box-sizing: border-box;
}

.gpjam-header {
    text-align: center;
    margin-bottom: 24px;
}

.gpjam-eyebrow {
    display: inline-block;
    color: #087F77;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.gpjam-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin: 0 0 10px 0;
}

.gpjam-desc {
    font-size: 15px;
    color: #475569;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.gpjam-workspace {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 4px 20px -2px rgba(8, 127, 119, 0.05);
}

.gpjam-dropzone {
    position: relative;
    border: 2px dashed #087F77;
    border-radius: 12px;
    background: #f8fbf9;
    padding: 44px 24px;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.gpjam-dropzone .gpjam-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.gpjam-drop-content {
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.gpjam-dropzone:hover, .gpjam-dropzone.dragover {
    background: #edf7f5;
    border-color: #06635d;
    transform: scale(0.995);
}

.gpjam-drop-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.gpjam-drop-text {
    font-size: 16px;
    color: #1e293b;
    font-weight: 600;
}

.gpjam-drop-text span {
    color: #087F77;
    text-decoration: underline;
}

.gpjam-drop-sub {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.gpjam-trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    font-size: 12px;
    color: #64748b;
}

/* File Selected Bar */
.gpjam-file-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.gpjam-file-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

/* Live Media Preview Card */
.gpjam-media-preview-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.gpjam-media-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.gpjam-media-preview-holder {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    min-height: 160px;
    max-height: 280px;
    overflow: hidden;
}

.gpjam-media-preview-img {
    max-height: 250px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    transition: transform 0.2s ease;
}

.gpjam-crop-overlay-box {
    position: absolute;
    border: 2px solid #087F77;
    background: rgba(8, 127, 119, 0.2);
    pointer-events: none;
    border-radius: 2px;
    transition: all 0.15s ease;
}

.gpjam-crop-overlay-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: #087F77;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
}

.gpjam-file-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gpjam-file-icon {
    font-size: 24px;
}

.gpjam-file-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpjam-file-size {
    font-size: 12px;
    color: #64748b;
}

.gpjam-btn-change-file {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.gpjam-btn-change-file:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Controls Box */
.gpjam-controls-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.gpjam-controls-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}

.gpjam-field-group {
    margin-bottom: 16px;
}

.gpjam-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.gpjam-range-kb {
    width: 100%;
    accent-color: #087F77;
    margin-bottom: 8px;
}

.gpjam-pills-row, .gpjam-format-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gpjam-pill-kb, .gpjam-pill-sig, .gpjam-fmt-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.gpjam-pill-kb:hover, .gpjam-pill-sig:hover, .gpjam-fmt-btn:hover {
    border-color: #087F77;
    color: #087F77;
}

.gpjam-pill-kb.active, .gpjam-pill-sig.active, .gpjam-fmt-btn.active {
    background: #087F77;
    border-color: #087F77;
    color: #ffffff;
}

.gpjam-dim-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gpjam-input-width, .gpjam-input-height {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
}

.gpjam-checkbox-row {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    font-size: 13px;
    color: #334155;
}

.gpjam-safety-badge {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* Primary Action Button */
.gpjam-btn-primary {
    display: block;
    width: 100%;
    background: #087F77;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 13px 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}

.gpjam-btn-primary:hover {
    background: #06635d;
    color: #ffffff;
}

.gpjam-btn-secondary {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
}

.gpjam-btn-secondary:hover {
    background: #f8fafc;
}

/* Progress Box */
.gpjam-progress-box {
    margin-top: 16px;
}

.gpjam-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.gpjam-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.gpjam-progress-bar-fill {
    width: 0%;
    height: 100%;
    background: #087F77;
    transition: width 0.2s ease;
}

/* Result Card */
.gpjam-result-card {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.gpjam-result-success {
    color: #087F77;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.gpjam-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}

.gpjam-stat-lbl {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
}

.gpjam-stat-val {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-top: 4px;
}

.gpjam-stat-val.highlight {
    color: #087F77;
}

.gpjam-reduction-badge {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.gpjam-preview-box {
    margin-bottom: 16px;
    text-align: center;
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
}

.gpjam-preview-img {
    max-height: 220px;
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gpjam-result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 600px) {
    .gpjam-result-actions {
        flex-direction: row;
    }
    .gpjam-result-actions .gpjam-btn-primary {
        flex: 2;
    }
    .gpjam-result-actions .gpjam-btn-secondary {
        flex: 1;
    }
}

/* Tool Mode Specific UI Controls (Crop, Passport, PDF, Format, Rotate) */
.gpjam-spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
@media (min-width: 600px) {
    .gpjam-spec-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.gpjam-spec-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
}
.gpjam-spec-btn:hover {
    border-color: #087F77;
}
.gpjam-spec-btn.active {
    border-color: #087F77;
    background: #f0fdf9;
    box-shadow: 0 0 0 1px #087F77;
}
.gpjam-spec-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.gpjam-spec-btn.active .gpjam-spec-title {
    color: #087F77;
}
.gpjam-spec-desc {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}
.gpjam-sheet-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
}
.gpjam-chk-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
}
.gpjam-dim-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
@media (min-width: 600px) {
    .gpjam-dim-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}
.gpjam-dim-grid-4 input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}
.gpjam-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.gpjam-btn-aux {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.gpjam-btn-aux:hover {
    border-color: #087F77;
    color: #087F77;
}
.gpjam-aspect-btn, .gpjam-bg-btn, .gpjam-sheet-btn, .gpjam-ori-btn, .gpjam-size-btn, .gpjam-rot-btn, .gpjam-doc-btn, .gpjam-qual-btn, .gpjam-fill-btn, .gpjam-pill-resize {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.gpjam-aspect-btn:hover, .gpjam-bg-btn:hover, .gpjam-sheet-btn:hover, .gpjam-ori-btn:hover, .gpjam-size-btn:hover, .gpjam-rot-btn:hover, .gpjam-doc-btn:hover, .gpjam-qual-btn:hover, .gpjam-fill-btn:hover, .gpjam-pill-resize:hover {
    border-color: #087F77;
    color: #087F77;
}
.gpjam-aspect-btn.active, .gpjam-bg-btn.active, .gpjam-sheet-btn.active, .gpjam-ori-btn.active, .gpjam-size-btn.active, .gpjam-rot-btn.active, .gpjam-doc-btn.active, .gpjam-qual-btn.active, .gpjam-fill-btn.active, .gpjam-pill-resize.active {
    background: #087F77;
    border-color: #087F77;
    color: #ffffff;
}
.gpjam-crop-preview-wrap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}
.gpjam-crop-preview-box {
    position: relative;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 200px;
    overflow: hidden;
}
.gpjam-crop-canvas-holder {
    position: relative;
    display: inline-block;
    max-height: 180px;
}
.gpjam-crop-preview-source {
    max-height: 180px;
    max-width: 100%;
    border-radius: 4px;
    display: block;
    opacity: 0.85;
}
.gpjam-crop-selection-box {
    position: absolute;
    border: 2px solid #087F77;
    background: rgba(8, 127, 119, 0.2);
    pointer-events: none;
    border-radius: 2px;
}
.gpjam-crop-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #087F77;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
}
