/* ============================================
   Free Tools — Shared Styles
   ============================================ */

/* Hero */
.tool-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
    padding: 5rem 2rem 4rem;
    padding-top: 120px;
    text-align: center;
}

.tool-hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.tool-breadcrumbs {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.tool-breadcrumbs a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.tool-breadcrumbs a:hover {
    color: #93c5fd;
}

.tool-breadcrumbs span {
    color: #93c5fd;
    font-weight: 500;
}

.tool-hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.25);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #93c5fd;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.tool-hero h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 800;
}

.tool-hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 650px;
    margin: 0 auto;
}

/* Main Layout */
.tool-main {
    background: #f8fafc;
    padding: 0 2rem 4rem;
}

.tool-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* Tool Interface — Two Panel Layout */
.tool-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.tool-input-panel,
.tool-output-panel {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.tool-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

/* Form Elements */
.tool-field {
    margin-bottom: 1.25rem;
}

.tool-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.tool-field .tool-field-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.4rem;
}

.tool-field input[type="text"],
.tool-field input[type="number"],
.tool-field input[type="email"],
.tool-field textarea,
.tool-field select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.tool-field input:focus,
.tool-field textarea:focus,
.tool-field select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

.tool-field textarea {
    resize: vertical;
    min-height: 80px;
}

.tool-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Range/Slider */
.tool-field input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    appearance: none;
    outline: none;
    margin-top: 0.5rem;
}

.tool-field input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.tool-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.tool-range-value {
    display: inline-block;
    background: #eff6ff;
    color: #1e40af;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Buttons */
.tool-btn-primary {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-top: 1.5rem;
}

.tool-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.tool-btn-primary:active {
    transform: translateY(0);
}

.tool-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.tool-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.tool-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

/* Output Panel */
.tool-output-placeholder {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.tool-output-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.tool-output-placeholder p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.tool-output-content {
    animation: toolFadeIn 0.3s ease-out;
}

@keyframes toolFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Result Cards */
.tool-result-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.tool-result-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.tool-result-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.tool-result-value.highlight {
    color: #2563eb;
}

.tool-result-value.success {
    color: #059669;
}

.tool-result-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Result Grid */
.tool-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Result Actions */
.tool-result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Copy Toast */
.tool-copy-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.tool-copy-toast.visible {
    transform: translateX(-50%) translateY(0);
}

/* Loading Spinner */
.tool-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem;
    gap: 1rem;
}

.tool-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: toolSpin 0.8s linear infinite;
}

@keyframes toolSpin {
    to { transform: rotate(360deg); }
}

.tool-loading p {
    font-size: 0.9rem;
    color: #64748b;
}

/* Content Section (SEO text) */
.tool-content {
    margin-top: 4rem;
}

.tool-content h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.tool-content h3 {
    font-size: 1.4rem;
    color: #334155;
    margin-bottom: 0.75rem;
    margin-top: 2rem;
}

.tool-content p {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.tool-content ul, .tool-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.tool-content li {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.tool-content strong {
    color: #1e293b;
}

/* FAQ */
.tool-faq {
    margin-top: 4rem;
}

.tool-faq > h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 2rem;
}

.tool-faq-grid {
    display: grid;
    gap: 1.25rem;
}

.tool-faq-item {
    background: white;
    padding: 1.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.tool-faq-item h4 {
    color: #1e293b;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.tool-faq-item p {
    color: #475569;
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
}

/* Related Tools */
.tool-related {
    margin-top: 4rem;
}

.tool-related > h2 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 2rem;
}

.tool-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.tool-related-card {
    background: white;
    padding: 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tool-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.tool-related-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.tool-related-card h4 {
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.tool-related-card p {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* CTA */
.tool-cta {
    margin-top: 4rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    padding: 4rem 3rem;
    border-radius: 16px;
    text-align: center;
    color: white;
}

.tool-cta h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: white;
}

.tool-cta > p {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.tool-cta-features {
    list-style: none;
    padding: 0;
    margin: 0 auto 2.5rem;
    max-width: 400px;
    text-align: left;
}

.tool-cta-features li {
    padding: 0.4rem 0;
    font-size: 1rem;
    opacity: 0.95;
}

.tool-cta-features li::before {
    content: "\2713  ";
    color: #93c5fd;
    font-weight: 700;
}

.tool-cta-button {
    display: inline-block;
    background: #3b82f6;
    color: white;
    padding: 1.1rem 2.5rem;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.tool-cta-button:hover {
    transform: translateY(-2px);
    background: #2563eb;
}

.tool-cta-note {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
    .tool-interface {
        grid-template-columns: 1fr;
    }

    .tool-hero h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .tool-hero {
        padding: 4rem 1.25rem 3rem;
        padding-top: 100px;
    }

    .tool-hero h1 {
        font-size: 1.8rem;
    }

    .tool-hero-subtitle {
        font-size: 1rem;
    }

    .tool-input-panel,
    .tool-output-panel {
        padding: 1.5rem;
    }

    .tool-result-grid {
        grid-template-columns: 1fr;
    }

    .tool-cta {
        padding: 2.5rem 1.5rem;
    }

    .tool-cta h2 {
        font-size: 1.6rem;
    }

    .tool-related-grid {
        grid-template-columns: 1fr;
    }
}
