/* tools.umarrajput.com — light custom layer on top of Tailwind */

:root {
    --brand-50:  #eff6ff;
    --brand-500: #3b82f6;
    --brand-700: #1d4ed8;
    --brand-800: #1e40af;
    --brand-900: #1e3a8a;
    --site-width: 1140px;
}

html { scroll-behavior: smooth; }
body { font-feature-settings: "cv11", "ss01"; }

/* Alpine.js cloak */
[x-cloak] { display: none !important; }

/* Ad slots — reserved space, controlled by ADSENSE_ENABLED in config.php */
.ad-slot {
    margin: 1.5rem 0;
    text-align: center;
    overflow: hidden;
}
.ad-slot ins.adsbygoogle {
    background: #f8fafc;
    min-height: 90px;
    display: block;
}
.ad-slot-home_top, .ad-slot-home_middle { margin: 0; padding: 0.5rem 0; }
.ad-slot-alltools_top { margin: 0 0 1rem 0; }

/* Cap site width at 1140px on every container, regardless of Tailwind utilities */
.container,
main.container,
.container.mx-auto {
    max-width: var(--site-width) !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Override any max-w-7xl / max-w-6xl / max-w-5xl when wider than the site cap */
.max-w-7xl,
.max-w-6xl,
.max-w-5xl {
    max-width: var(--site-width) !important;
}

/* Tool form polish */
.tool-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.tool-input,
.tool-textarea,
.tool-select {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: .6rem;
    padding: .65rem .8rem;
    font-size: .95rem;
    color: #0f172a;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.tool-input:focus,
.tool-textarea:focus,
.tool-select:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
    background: #fff;
}
.tool-textarea { min-height: 160px; resize: vertical; }
.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    color: #fff;
    padding: .7rem 1.2rem;
    border-radius: .6rem;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    transition: transform .05s ease, box-shadow .15s ease, opacity .15s ease;
    box-shadow: 0 4px 14px rgba(29, 78, 216, .25);
}
.tool-btn:hover { box-shadow: 0 6px 18px rgba(29, 78, 216, .35); }
.tool-btn:active { transform: translateY(1px); }
.tool-btn:disabled { opacity: .55; cursor: not-allowed; }
.tool-btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    box-shadow: none;
}
.tool-btn-secondary:hover { background: #e2e8f0; box-shadow: none; }

.tool-result {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: .8rem;
    padding: 1rem 1.1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .85rem;
    overflow: auto;
    max-height: 480px;
    white-space: pre-wrap;
    word-break: break-word;
}
.tool-success { color: #16a34a; }
.tool-error   { color: #dc2626; }
.tool-muted   { color: #64748b; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.2;
}
.badge-ai     { background: #f3e8ff; color: #6b21a8; }
.badge-free   { background: #dcfce7; color: #166534; }
.badge-new    { background: #fef3c7; color: #92400e; }

.cat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
    border-color: var(--brand-500);
}
.tool-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .55rem .75rem;
    border-radius: .55rem;
    font-size: .88rem;
    color: #334155;
    transition: background .15s ease, color .15s ease;
}
.tool-link:hover { background: #eff6ff; color: var(--brand-700); }

.prose h2 { color: #0f172a; }
.prose ul li::marker { color: var(--brand-500); }
.prose code {
    background: #eef2ff;
    color: #3730a3;
    padding: .12rem .4rem;
    border-radius: .35rem;
    font-size: .85em;
}

/* Loading dots */
.loader {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pretty file dropzone */
.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: .8rem;
    background: #f8fafc;
    padding: 2rem 1rem;
    text-align: center;
    color: #64748b;
    transition: border-color .15s ease, background .15s ease;
    cursor: pointer;
}
.dropzone:hover, .dropzone.dragging {
    border-color: var(--brand-500);
    background: #eff6ff;
    color: var(--brand-700);
}
