/* =========================================================
   PDF INSPECTOR
   PDF Tool Interface Styles
   ========================================================= */


/* ---------------------------------------------------------
   TOOL HERO
   --------------------------------------------------------- */

.tool-hero {
    padding: 70px 0 45px;
    text-align: center;
    background: #f8fafc;
    border-bottom: 1px solid #edf0f4;
}

.tool-hero h1 {
    max-width: 850px;
    margin: 0 auto 15px;
    color: #172033;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
    font-weight: 800;
}

.tool-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: #667085;
    font-size: 17px;
}


/* ---------------------------------------------------------
   TOOL WRAPPER
   --------------------------------------------------------- */

.tool-section {
    padding: 45px 0 70px;
}

.tool-wrapper {
    width: min(850px, 100%);
    margin: 0 auto;
}


/* ---------------------------------------------------------
   TOOL CARD
   --------------------------------------------------------- */

.tool-card {
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e3e7ed;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(23, 32, 51, 0.07);
}


/* ---------------------------------------------------------
   UPLOAD AREA
   --------------------------------------------------------- */

.upload-area {
    position: relative;
    padding: 45px 25px;
    text-align: center;
    border: 2px dashed #cfd6e0;
    border-radius: 13px;
    background: #fafbfc;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.upload-area:hover {
    border-color: #e63946;
    background: #fff8f8;
}

.upload-area.dragover {
    border-color: #e63946;
    background: #fff5f6;
}

.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 14px;
    background: #fff0f1;
    color: #e63946;
    font-size: 25px;
    font-weight: 800;
}

.upload-area h2 {
    margin: 0 0 8px;
    color: #172033;
    font-size: 21px;
}

.upload-area p {
    margin: 0 0 18px;
    color: #667085;
    font-size: 14px;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 8px;
    background: #e63946;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.upload-button:hover {
    background: #cf2f3b;
}

.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}


/* ---------------------------------------------------------
   FILE INFORMATION
   --------------------------------------------------------- */

.file-info {
    display: none;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    background: #f8fafc;
}

.file-info.active {
    display: block;
}

.file-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 7px 0;
}

.file-info-label {
    color: #667085;
    font-size: 13px;
}

.file-info-value {
    color: #172033;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}


/* ---------------------------------------------------------
   TOOL ACTIONS
   --------------------------------------------------------- */

.tool-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.tool-button {
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.tool-button:hover {
    transform: translateY(-1px);
}

.tool-button-primary {
    background: #e63946;
    color: #ffffff;
}

.tool-button-primary:hover {
    background: #cf2f3b;
}

.tool-button-secondary {
    background: #edf0f4;
    color: #39445a;
}

.tool-button-secondary:hover {
    background: #e2e6ec;
}


/* ---------------------------------------------------------
   LOADING
   --------------------------------------------------------- */

.tool-loading {
    display: none;
    padding: 30px 20px;
    text-align: center;
}

.tool-loading.active {
    display: block;
}

.loading-spinner {
    width: 38px;
    height: 38px;
    margin: 0 auto 13px;
    border: 4px solid #e8ebf0;
    border-top-color: #e63946;
    border-radius: 50%;
    animation: pdfInspectorSpin 0.8s linear infinite;
}

.tool-loading p {
    margin: 0;
    color: #667085;
    font-size: 14px;
}

@keyframes pdfInspectorSpin {
    to {
        transform: rotate(360deg);
    }
}


/* ---------------------------------------------------------
   ERROR MESSAGE
   --------------------------------------------------------- */

.tool-error {
    display: none;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #f1c4c8;
    border-radius: 9px;
    background: #fff5f6;
    color: #a52834;
    font-size: 14px;
}

.tool-error.active {
    display: block;
}


/* ---------------------------------------------------------
   SUCCESS MESSAGE
   --------------------------------------------------------- */

.tool-success {
    display: none;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #c7e5d0;
    border-radius: 9px;
    background: #f3fbf5;
    color: #28733c;
    font-size: 14px;
}

.tool-success.active {
    display: block;
}


/* ---------------------------------------------------------
   RESULTS
   --------------------------------------------------------- */

.tool-results {
    display: none;
    margin-top: 28px;
}

.tool-results.active {
    display: block;
}

.results-title {
    margin: 0 0 15px;
    color: #172033;
    font-size: 21px;
    font-weight: 800;
}


/* ---------------------------------------------------------
   RESULTS TABLE
   --------------------------------------------------------- */

.results-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
}

.results-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: #ffffff;
}

.results-table th,
.results-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    font-size: 14px;
}

.results-table th {
    background: #f8fafc;
    color: #39445a;
    font-weight: 700;
}

.results-table td {
    color: #4f5b70;
}

.results-table tr:last-child td {
    border-bottom: 0;
}


/* ---------------------------------------------------------
   RESULT STATUS
   --------------------------------------------------------- */

.result-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.result-status-good {
    background: #eaf7ee;
    color: #28733c;
}

.result-status-warning {
    background: #fff6df;
    color: #8a6410;
}

.result-status-error {
    background: #fff0f1;
    color: #a52834;
}


/* ---------------------------------------------------------
   RESULT SUMMARY
   --------------------------------------------------------- */

.result-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.summary-box {
    padding: 18px;
    border: 1px solid #e3e7ed;
    border-radius: 10px;
    background: #ffffff;
}

.summary-label {
    margin-bottom: 5px;
    color: #667085;
    font-size: 12px;
}

.summary-value {
    color: #172033;
    font-size: 20px;
    font-weight: 800;
}


/* ---------------------------------------------------------
   TOOL FEATURES
   --------------------------------------------------------- */

.tool-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 35px;
}

.tool-feature {
    padding: 22px;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    background: #ffffff;
}

.tool-feature-icon {
    margin-bottom: 12px;
    color: #e63946;
    font-size: 22px;
}

.tool-feature h3 {
    margin: 0 0 7px;
    color: #172033;
    font-size: 16px;
}

.tool-feature p {
    margin: 0;
    color: #667085;
    font-size: 13px;
}


/* ---------------------------------------------------------
   RELATED TOOLS
   --------------------------------------------------------- */

.related-tools {
    padding: 65px 0;
    background: #f8fafc;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 30px;
}

.related-tool-card {
    display: block;
    padding: 22px;
    border: 1px solid #e3e7ed;
    border-radius: 12px;
    background: #ffffff;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.related-tool-card:hover {
    border-color: #d1d7e0;
    box-shadow: 0 8px 25px rgba(23, 32, 51, 0.06);
    transform: translateY(-2px);
}

.related-tool-card h3 {
    margin: 0 0 7px;
    color: #172033;
    font-size: 16px;
}

.related-tool-card p {
    margin: 0;
    color: #667085;
    font-size: 13px;
}


/* ---------------------------------------------------------
   FAQ
   --------------------------------------------------------- */

.faq-section {
    padding: 70px 0;
}

.faq-list {
    width: min(850px, 100%);
    margin: 30px auto 0;
}

.faq-item {
    margin-bottom: 12px;
    border: 1px solid #e3e7ed;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    border: 0;
    background: #ffffff;
    color: #172033;
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.faq-answer {
    display: none;
    padding: 0 20px 18px;
    color: #667085;
    font-size: 14px;
}

.faq-item.active .faq-answer {
    display: block;
}


/* ---------------------------------------------------------
   ARTICLE CONTENT BELOW TOOL
   --------------------------------------------------------- */

.tool-article {
    padding: 70px 0;
}

.tool-article-inner {
    width: min(850px, 100%);
    margin: 0 auto;
}

.tool-article h2 {
    margin: 45px 0 15px;
    color: #172033;
    font-size: 28px;
    line-height: 1.25;
}

.tool-article h3 {
    margin: 30px 0 12px;
    color: #172033;
    font-size: 20px;
}

.tool-article p {
    margin: 0 0 18px;
    color: #4f5b70;
    font-size: 16px;
}

.tool-article ul,
.tool-article ol {
    margin: 0 0 22px;
    padding-left: 25px;
}

.tool-article li {
    margin-bottom: 8px;
    color: #4f5b70;
}


/* ---------------------------------------------------------
   NOTICE / PRIVACY
   --------------------------------------------------------- */

.tool-notice {
    margin-top: 25px;
    padding: 18px;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    background: #f8fafc;
    color: #667085;
    font-size: 13px;
}


/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */

@media (max-width: 800px) {

    .tool-hero {
        padding: 55px 0 35px;
    }

    .tool-section {
        padding: 35px 0 55px;
    }

    .tool-card {
        padding: 22px;
    }

    .tool-features,
    .related-tools-grid {
        grid-template-columns: 1fr 1fr;
    }

    .result-summary {
        grid-template-columns: 1fr 1fr;
    }

}


@media (max-width: 600px) {

    .tool-hero {
        padding: 45px 0 30px;
    }

    .tool-hero h1 {
        font-size: 32px;
    }

    .tool-hero p {
        font-size: 15px;
    }

    .tool-section {
        padding: 25px 0 45px;
    }

    .tool-card {
        padding: 15px;
        border-radius: 12px;
    }

    .upload-area {
        padding: 35px 15px;
    }

    .upload-area h2 {
        font-size: 18px;
    }

    .tool-actions {
        flex-direction: column;
    }

    .tool-button {
        width: 100%;
    }

    .file-info-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .file-info-value {
        text-align: left;
    }

    .tool-features,
    .related-tools-grid,
    .result-summary {
        grid-template-columns: 1fr;
    }

    .results-table {
        min-width: 560px;
    }

    .tool-article {
        padding: 50px 0;
    }

}
/* =========================================================
   PDF UPLOAD BOX
   ========================================================= */

.pdf-upload-form {
    margin-top: 30px;
}


/* Main upload area */

.pdf-upload-box {
    position: relative;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 45px 25px;
    background: #fafaf8;
    border: 2px dashed #d6d6d0;
    border-radius: 14px;
    cursor: pointer;
    text-align: center;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.pdf-upload-box:hover {
    border-color: #ed4646;
    background: #fffafa;
    transform: translateY(-2px);
}

.pdf-upload-box.dragging {
    border-color: #ed4646;
    background: #fff3f3;
}


/* PDF Icon */

.upload-pdf-icon {
    margin-bottom: 22px;
}

.pdf-icon-shape {
    position: relative;
    width: 68px;
    height: 78px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 14px;
    background: #ed4646;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 25px rgba(237, 70, 70, 0.18);
}

.pdf-icon-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 23px;
    height: 23px;
    background: #ffffff;
    clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.pdf-icon-text {
    position: relative;
    z-index: 2;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}


/* Upload text */

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-title {
    color: #171717;
    font-size: 18px;
    font-weight: 800;
}

.upload-description {
    margin-top: 6px;
    color: #777770;
    font-size: 14px;
}

.upload-or {
    margin-top: 6px;
    color: #aaa9a2;
    font-size: 12px;
}

.upload-browse {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    background: #171717;
    color: #ffffff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
    transition: background 0.2s ease;
}

.pdf-upload-box:hover .upload-browse {
    background: #ed4646;
}

.upload-help {
    margin-top: 14px;
    color: #aaa9a2;
    font-size: 11px;
}


/* =========================================================
   SELECTED FILE
   ========================================================= */

.selected-file {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 14px;
    padding: 15px 17px;
    background: #f7f7f4;
    border: 1px solid #deded9;
    border-radius: 9px;
}

.selected-file-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 48px;
    background: #ed4646;
    color: #ffffff;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.selected-file-info {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.selected-file-name {
    overflow: hidden;
    color: #171717;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-file-info span {
    margin-top: 3px;
    color: #777770;
    font-size: 11px;
}

.remove-file {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #777770;
    border: 1px solid #d8d8d3;
    border-radius: 6px;
    cursor: pointer;
    font-size: 21px;
    line-height: 1;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.remove-file:hover {
    background: #fff1f1;
    color: #ed4646;
    border-color: #ed4646;
}


/* =========================================================
   CHECK BUTTON
   ========================================================= */

.checker-button {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 0 22px;
    background: #ed4646;
    color: #ffffff;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 25px rgba(237, 70, 70, 0.16);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.checker-button:hover {
    background: #d93636;
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(237, 70, 70, 0.22);
}

.button-arrow {
    font-size: 21px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {

    .pdf-upload-box {
        min-height: 250px;
        padding: 35px 20px;
    }

    .upload-title {
        font-size: 17px;
    }

    .upload-description {
        font-size: 13px;
    }

    .selected-file {
        padding: 13px;
    }

    .selected-file-name {
        max-width: 180px;
    }

}