/*
Theme Name: Link Downloader - FileGrab
Description: A clean, fast WordPress theme for the FileGrab online file downloader tool.
Version: 3.0
Author: Numan Rasheed
Author URI: https://github.com/numanrki
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: link-downloader
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: #222;
    background: #f8fafc;
}

header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.nav-links a {
    color: #555;
    text-decoration: none;
    margin-left: 24px;
    font-size: 15px;
}

.nav-links a:hover {
    color: #2563eb;
}

.hero {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    padding: 60px 24px 80px;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    opacity: 0.95;
    max-width: 640px;
    margin: 0 auto 36px;
}

.tool-box {
    max-width: 720px;
    margin: -50px auto 60px;
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.tool-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
    color: #333;
}

.input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tool-box input {
    flex: 1;
    min-width: 200px;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border 0.2s;
}

.tool-box input:focus {
    border-color: #2563eb;
}

.tool-box button {
    padding: 14px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.tool-box button:hover {
    background: #1e40af;
}

.hint {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

article h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 16px;
    color: #111;
}

article h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 10px;
}

article p {
    margin-bottom: 16px;
    font-size: 16px;
}

article ul,
article ol {
    margin: 0 0 16px 24px;
}

article ul li,
article ol li {
    margin-bottom: 8px;
}

article blockquote {
    border-left: 4px solid #2563eb;
    padding: 12px 20px;
    margin: 20px 0;
    background: #eff6ff;
    font-style: italic;
    color: #1e3a8a;
    border-radius: 6px;
}

article strong {
    color: #111;
}

.updated {
    color: #777;
    font-size: 14px;
    margin-bottom: 20px;
}

.notice-box {
    position: relative;
    margin: 8px 0 28px;
    padding: 24px 24px 22px;
    background: linear-gradient(135deg, #fff1f2 0%, #ffffff 52%, #fff7ed 100%);
    border: 1px solid #fecaca;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(220, 38, 38, 0.12);
    overflow: hidden;
}

.notice-box::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, #dc2626 0%, #fb7185 100%);
}

.notice-box__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notice-box__title {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.25;
    color: #7f1d1d;
}

.notice-box__text {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.75;
    color: #4b5563;
}

.notice-box__text:last-child {
    margin-bottom: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

th {
    background: #f1f5f9;
    font-weight: 600;
    color: #333;
}

tr:last-child td {
    border-bottom: none;
}

.faq-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 12px;
}

.faq-item strong {
    display: block;
    margin-bottom: 8px;
    color: #2563eb;
    font-size: 16px;
}

/* — Footer single line bar (merged from former child theme) — */
.site-footer {
    background: #111827;
    color: #cbd5e1;
    padding: 0 24px;
    text-align: left;
    font-size: 14px;
}

.site-footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.site-footer__tagline {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-footer__nav {
    margin-top: 0;
}

.footer-menu {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    display: flex;
    align-items: center;
}

.footer-menu li::after {
    content: '\2022';
    margin-left: 4px;
    margin-right: 4px;
    color: #475569;
    font-size: 12px;
}

.footer-menu li:last-child::after {
    display: none;
}

.footer-menu a {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-menu a:hover,
.footer-menu a:focus-visible {
    background: rgba(147, 197, 253, 0.12);
    color: #f8fafc;
    transform: translateY(-1px);
}

.site-footer a {
    color: #93c5fd;
    text-decoration: none;
}

/* Download progress bar */
.dl-progress {
    margin-top: 18px;
}

.dl-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.dl-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
}

.dl-progress-percent {
    font-size: 14px;
    font-weight: 700;
    color: #2563eb;
    min-width: 40px;
    text-align: right;
}

.dl-progress-track {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.dl-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 50%, #2563eb 100%);
    background-size: 200% 100%;
    animation: dlShimmer 1.5s ease-in-out infinite;
    transition: width 0.3s ease;
}

@keyframes dlShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.dl-progress-bar.dl-complete {
    background: linear-gradient(90deg, #16a34a, #4ade80);
    animation: none;
}

/* Download status messages */
.dl-status {
    margin-top: 14px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.dl-status--info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.dl-status--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

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

.tool-box button:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

/* Fetching spinner */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

.file-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 0;
}

.fetch-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: btnSpin 0.7s linear infinite;
}

.fetch-spinner-text {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}

/* File Preview */
.file-preview {
    margin-top: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    animation: fadeInPreview 0.3s ease;
}

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

.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid #e5e7eb;
}

.file-preview-label {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.file-preview-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.file-preview-close:hover {
    color: #ef4444;
}

.file-preview-content {
    padding: 16px;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-content img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.file-preview-content video,
.file-preview-content audio {
    max-width: 100%;
    border-radius: 8px;
}

.file-preview-content iframe {
    width: 100%;
    height: 320px;
    border: none;
    border-radius: 8px;
}

.file-preview-content .file-icon-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
}

.file-icon-block .file-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
}

.file-icon-block .file-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    word-break: break-all;
    max-width: 100%;
}

.file-preview-info {
    padding: 8px 16px 12px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 600px) {
    .file-preview-content img { max-height: 200px; }
    .file-preview-content iframe { height: 220px; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 16px; }
    article h2 { font-size: 24px; }
    .tool-box { margin: -40px 16px 40px; padding: 24px; }
    .nav-links a { margin-left: 14px; font-size: 13px; }

    /* Footer mobile (from former child theme) */
    .site-footer {
        padding: 16px 18px;
        text-align: center;
    }
    .site-footer__inner {
        height: auto;
        flex-direction: column;
        gap: 10px;
    }
    .site-footer__tagline {
        white-space: normal;
        font-size: 14px;
    }
    .footer-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 8px;
    }
    .footer-menu li::after {
        margin-left: 8px;
        margin-right: 0;
    }
    .footer-menu a {
        padding: 7px 10px;
        font-size: 13px;
    }

    .notice-box { padding: 20px 18px 18px; border-radius: 14px; }
    .notice-box__title { font-size: 20px; }
    .notice-box__text { font-size: 14px; }
    table { font-size: 13px; }
    th, td { padding: 10px; }
}

/* Custom Logo */
.site-logo {
    display: flex;
    align-items: center;
}

.site-logo a {
    display: flex;
    align-items: center;
}

.site-logo img {
    max-height: 40px;
    width: auto;
}

/* — WPSeoPress FAQ Accordion — */
.wpseopress-faqs {
    margin: 32px 0 16px;
}

.wpseopress-faqs > style {
    display: none;
}

.wpseopress-faq {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.wpseopress-faq:hover {
    border-color: #bfdbfe;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
}

.wpseopress-faq.faq-open {
    border-color: #2563eb;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
}

.wpseopress-accordion-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 16px;
    transition: background 0.2s;
}

.wpseopress-accordion-button:hover {
    background: #f8fafc;
}

.wpseopress-faq-question {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
    flex: 1;
}

.wpseopress-faq-question strong {
    font-weight: 600;
    color: inherit;
}

.wpseopress-accordion-button::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2.5px solid #2563eb;
    border-bottom: 2.5px solid #2563eb;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-top: -3px;
}

.wpseopress-faq.faq-open .wpseopress-accordion-button::after {
    transform: rotate(-135deg);
    margin-top: 3px;
}

.wpseopress-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 22px;
}

.wpseopress-faq-answer.faq-visible {
    max-height: 300px;
    padding: 0 22px 20px;
}

.wpseopress-faq-answer-desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 600px) {
    .wpseopress-accordion-button { padding: 14px 16px; }
    .wpseopress-faq-question { font-size: 15px; }
    .wpseopress-faq-answer.faq-visible { padding: 0 16px 16px; }
}
