/* Tools Page Styles - Clean, Tool-First Layout */

/* Tool Page Layout */
.tool-page {
    min-height: calc(100vh - 200px);
    background: #f8f9fa;
}

/* Header - Compact, gets user to tool fast */
.tool-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem 0;
}

.tool-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tool-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
}

/* Privacy Badge - Prominent green pill badge */
.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius-full, 9999px);
    border: 1px solid #a7f3d0;
    white-space: nowrap;
}

.privacy-badge i {
    font-size: 0.75rem;
}

/* Mobile: plain text, no pill styling */
@media (max-width: 576px) {
    .privacy-badge {
        background: transparent;
        border: none;
        padding: 0;
        white-space: normal;
        font-size: 0.75rem;
    }
}

/* Main Tool Area */
.tool-main {
    padding: 2rem 0 3rem;
}

/* Tool Interface - Wide for the drop zone */
.tool-interface {
    max-width: 900px;
    margin: 0 auto;
}

/* Drop Zone - Large and prominent */
.drop-zone {
    background: #fff;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-md);
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drop-zone:hover {
    border-color: #4A90E2;
    background: #f8faff;
}

.drop-zone.drag-over {
    border-color: #4A90E2;
    background: #eef4ff;
    border-style: solid;
}

.drop-zone-icon {
    font-size: 3.5rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.drop-zone:hover .drop-zone-icon {
    color: #4A90E2;
}

.drop-zone-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.drop-zone-hint {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
}

.drop-zone-btn {
    background: #4A90E2;
    border: none;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.drop-zone-btn:hover {
    background: #3a7bc8;
}

/* Hidden file input */
.file-input-hidden {
    display: none;
}

/* Tool Options */
.tool-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
}

.tool-option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1f2937;
    user-select: none;
}

.tool-option-checkbox input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: #4A90E2;
    cursor: pointer;
}

.option-hint {
    font-size: 0.8125rem;
    color: #6b7280;
}

@media (max-width: 576px) {
    .tool-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }

    .option-hint {
        padding-left: 1.625rem;
    }
}

/* Results Section */
.results-section {
    margin-top: 1.5rem;
    display: none;
}

.results-section.active {
    display: block;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: 1px solid #e5e7eb;
    border-bottom: none;
}

.results-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.results-list {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* Result Card */
.result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.result-card:last-child {
    border-bottom: none;
}

.result-thumbnail {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    background: #e5e7eb;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-filename {
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.125rem;
    color: #1f2937;
}

.result-dimensions {
    font-size: 0.8125rem;
    color: #6b7280;
}

.result-actions {
    flex-shrink: 0;
}

.result-actions .btn {
    background: #4A90E2;
    border: none;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.result-actions .btn:hover {
    background: #3a7bc8;
}

/* Error State */
.result-card.error {
    background: #fef2f2;
}

.result-card.error .result-filename {
    color: #dc2626;
}

.error-message {
    color: #dc2626;
    font-size: 0.8125rem;
}

/* Processing State */
.result-card.processing {
    opacity: 0.7;
}

.processing-spinner {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.processing-spinner i {
    font-size: 1.25rem;
    color: #4A90E2;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Bulk Download Button */
.bulk-download-btn {
    display: none;
    background: transparent;
    border: 1px solid #4A90E2;
    color: #4A90E2;
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bulk-download-btn:hover {
    background: #4A90E2;
    color: #fff;
}

.bulk-download-btn.active {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tool Content Section - Narrower for readability */
.tool-content {
    max-width: 680px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
}

.tool-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.75rem 0 0.625rem;
    color: #1f2937;
}

.tool-content h2:first-child {
    margin-top: 0;
}

.tool-content p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 0.875rem;
}

.tool-content ul, .tool-content ol {
    color: #4b5563;
    line-height: 1.7;
    padding-left: 1.25rem;
    margin-bottom: 0.875rem;
}

.tool-content li {
    margin-bottom: 0.375rem;
}

/* Related Tools - Simple inline links */
.related-tools-section {
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.related-tools-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.related-tools-label {
    color: #6b7280;
}

.related-tool-link {
    color: #4A90E2;
    text-decoration: none;
}

.related-tool-link:hover {
    text-decoration: underline;
}

.related-tools-sep {
    color: #d1d5db;
}

/* Tools Landing Page */
.tools-landing {
    padding-top: 2rem;
}

.tools-header {
    margin-bottom: 2rem;
}

.tools-header h1 {
    font-weight: 700;
}

.tools-header .lead {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Tool Cards (Landing Page) */
.tool-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.tool-card:hover {
    border-color: #4A90E2;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.12);
}

.tool-card-icon {
    width: 44px;
    height: 44px;
    background: #eef4ff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tool-card-icon i {
    font-size: 1.125rem;
    color: #4A90E2;
}

.tool-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.tool-card h3 a {
    color: #1f2937;
    text-decoration: none;
}

.tool-card h3 a:hover {
    color: #4A90E2;
}

.tool-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Info Blocks */
.info-block {
    text-align: center;
    padding: 1.5rem;
}

.info-block i {
    font-size: 2rem;
    color: #4A90E2;
    margin-bottom: 1rem;
}

.info-block h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.info-block p {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

/* Platform Cards */
.platform-cards {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.platform-cards h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.platform-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    height: 100%;
}

.platform-card:hover {
    background: #fff;
    border-color: #4A90E2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.12);
    text-decoration: none;
    color: inherit;
}

.platform-card-icon {
    width: 44px;
    height: 44px;
    background: #eef4ff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.platform-card-icon i {
    font-size: 1.125rem;
    color: #4A90E2;
}

.platform-card-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1f2937;
}

.platform-card-content p {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
}

/* Notification System */
.notification-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
}

.notification {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 0.875rem;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification i {
    font-size: 1rem;
    flex-shrink: 0;
}

.notification span {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    margin-left: 0.5rem;
}

.notification-close:hover {
    opacity: 1;
}

.notification-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.notification-success .notification-close {
    color: #065f46;
}

.notification-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.notification-warning .notification-close {
    color: #92400e;
}

.notification-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.notification-error .notification-close {
    color: #991b1b;
}

/* Noscript Alert */
.alert-warning {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Focus States for Accessibility */
.drop-zone:focus,
.drop-zone.focused {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
    border-color: #4A90E2;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-header {
        padding: 1rem 0;
    }

    .tool-header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tool-title {
        font-size: 1.25rem;
    }

    .tool-main {
        padding: 1.25rem 0 2rem;
    }

    .drop-zone {
        padding: 2.5rem 1.5rem;
        border-radius: var(--radius-md);
    }

    .drop-zone-icon {
        font-size: 2.5rem;
    }

    .drop-zone-text {
        font-size: 1.125rem;
    }

    .drop-zone-btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9375rem;
    }

    .result-card {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .result-thumbnail,
    .processing-spinner {
        width: 48px;
        height: 48px;
    }

    .result-info {
        flex: 1;
        min-width: calc(100% - 60px);
    }

    .result-actions {
        width: 100%;
    }

    .result-actions .btn {
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .bulk-download-btn.active {
        width: 100%;
        justify-content: center;
    }

    .tool-content {
        margin: 2rem 0 0;
        padding: 1.5rem;
        border-left: none;
        border-right: none;
        border-radius: 0;
    }

    .related-tools-section {
        padding: 1.25rem 0;
    }

    .related-tools-row {
        font-size: 0.8125rem;
    }

    .notification-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}
