/**
 * ToolBox - Premium Technology Tool Page Engine Stylesheet (White + Indigo + Coral)
 */

.tool-page-wrapper {
    padding: 2.5rem 0 5rem;
}

.tool-header {
    margin-bottom: 2.25rem;
}

.tool-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background-color: var(--bg-indigo-soft);
    border: 1px solid rgba(79, 70, 229, 0.15);
    color: var(--indigo-primary);
    margin-bottom: 1rem;
}

.tool-header-icon svg {
    width: 28px;
    height: 28px;
}

.tool-page-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.tool-page-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.5;
}

.tool-container {
    max-width: 880px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

.breadcrumb a:hover {
    color: var(--indigo-primary);
}

.breadcrumb .sep {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--coral-primary);
    font-weight: 600;
}

/* Drag & Drop Upload Zone */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background-color: var(--bg-surface);
    padding: 3.5rem 1.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 1.75rem;
    position: relative;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--coral-primary);
    background-color: var(--bg-coral-soft);
    box-shadow: inset 0 0 20px rgba(255, 107, 107, 0.05);
}

.upload-dropzone:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}

.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
}

.dropzone-icon {
    color: var(--coral-primary);
    margin-bottom: 1rem;
    display: inline-flex;
    padding: 0.85rem;
    border-radius: var(--radius-full);
    background-color: var(--bg-coral-soft);
}

.dropzone-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

/* Primary Coral Button (#FF6B6B) */
.browse-button {
    display: inline-block;
    padding: 0.75rem 1.85rem;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    background-color: var(--coral-primary);
    border: 1px solid var(--coral-primary);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0.6rem 0;
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.28);
}

.browse-button:hover {
    background-color: var(--coral-hover);
    border-color: var(--coral-hover);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.38);
    transform: translateY(-1px);
}

.dropzone-or {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.35rem 0;
}

.dropzone-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Image Preview Card */
.image-preview-card {
    margin: 0 1.75rem 1.75rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.preview-media {
    width: 140px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-img-element {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Selected File Preview List */
.selected-files-list {
    margin: 0 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.file-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.file-icon-badge {
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    background-color: var(--bg-indigo-soft);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: var(--indigo-primary);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.file-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-remove-file {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
}

.btn-remove-file:hover {
    color: var(--error-color);
}

/* Progress / Processing State Bar */
.progress-bar-container {
    margin: 0 1.75rem 1.75rem;
    position: relative;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    height: 12px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--brand-gradient);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

.progress-label {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--indigo-primary);
    margin-top: 0.5rem;
}

/* Tool Options Panel */
.tool-options-panel {
    padding: 1.75rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

.options-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.15rem;
}

.form-control {
    font-family: var(--font-main);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.9rem;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: var(--indigo-primary);
    box-shadow: 0 0 0 3px var(--focus-glow);
}

/* Actions & Button System */
.tool-actions {
    padding: 1.75rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    padding: 0.8rem 2rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--coral-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(255, 107, 107, 0.28);
}

.btn-primary:hover {
    background-color: var(--coral-hover);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.38);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--indigo-primary);
}

.btn-secondary:hover {
    border-color: var(--indigo-primary);
    color: var(--indigo-hover);
    background-color: var(--bg-indigo-soft);
}

/* Result Panel & Box */
.result-panel {
    padding: 1.75rem;
    border-top: 1px solid var(--border-color);
}

.result-box {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.result-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.result-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0 1.75rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.stat-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.highlight {
    color: var(--coral-primary);
}

.result-actions-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.privacy-note-footer {
    padding: 1.15rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

.privacy-note-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}
