/*
|--------------------------------------------------------------------------
| InstantWebTool Custom UI Overrides
|--------------------------------------------------------------------------
| Update-safe custom layer.
| Do not move these rules into MonsterTools Canvas theme files.
|--------------------------------------------------------------------------
*/

/* ---------- General readability ---------- */

.wrap-content {
    border-radius: 14px;
}

.wrap-content p,
.wrap-content li {
    font-size: 1rem;
    line-height: 1.75;
}

.wrap-content .hero-title p {
    font-size: 1rem !important;
    line-height: 1.7;
    margin-top: .5rem;
    margin-bottom: 1.25rem;
}

.wrap-content h2 {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-top: 1.75rem;
    margin-bottom: .85rem;
}

.wrap-content h3 {
    font-size: 1.4rem;
    line-height: 1.35;
    margin-top: 1.5rem;
    margin-bottom: .75rem;
}

.wrap-content h4 {
    font-size: 1.15rem;
    line-height: 1.4;
}

/* Prevent tiny rich-content text */
.wrap-content p:not(.small),
.wrap-content li:not(.small) {
    font-size: 16px;
}

/* ---------- Rich-content tables ---------- */

.wrap-content table {
    width: 100%;
    max-width: 100%;
    margin: 1.25rem 0;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 16px;
    line-height: 1.55;
}

.wrap-content table th,
.wrap-content table td {
    padding: .8rem 1rem;
    border: 1px solid #dee2e6;
    vertical-align: top;
    text-align: left;
}

.wrap-content table th {
    font-weight: 700;
    background: #f8f9fa;
}

.wrap-content table tbody tr:nth-child(even) {
    background: #fcfcfd;
}

/* Dark mode table support */
[theme-mode="dark"] .wrap-content table th {
    background: rgba(255,255,255,.06);
}

[theme-mode="dark"] .wrap-content table th,
[theme-mode="dark"] .wrap-content table td {
    border-color: rgba(255,255,255,.14);
}

[theme-mode="dark"] .wrap-content table tbody tr:nth-child(even) {
    background: rgba(255,255,255,.025);
}

/* ---------- Tool/content cards ---------- */

.wrap-content {
    padding: 28px 24px;
}

.hero-title h1,
.hero-title h2 {
    letter-spacing: -.02em;
}

.box-shadow {
    border-radius: 14px;
}

/* ---------- Homepage tool/category presentation ---------- */

.products .items li a {
    border-radius: 12px;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.products .items li a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
}

.products .items li a span {
    font-size: 15px;
    line-height: 1.4;
}

/* ---------- Links inside article/tool content ---------- */

.wrap-content p a,
.wrap-content li a {
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

/* ---------- Mobile ---------- */

@media (max-width: 767.98px) {

    .wrap-content {
        padding: 20px 16px;
    }

    .wrap-content h2 {
        font-size: 1.5rem;
    }

    .wrap-content h3 {
        font-size: 1.25rem;
    }

    /*
     * CKEditor/article tables may not have Bootstrap's
     * .table-responsive wrapper, so allow horizontal scrolling.
     */
    .wrap-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: normal;
    }

    .wrap-content table th,
    .wrap-content table td {
        min-width: 130px;
    }
}


/*
|--------------------------------------------------------------------------
| IWT UI V2 — Homepage / Cards / Header
|--------------------------------------------------------------------------
*/

/* Main content width */
.contant-wrap > .container {
    max-width: 1240px;
}

/* Homepage/page title */
.contant-wrap > .container > .row > .col > h1 {
    font-size: 1.75rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.025em;
    margin-bottom: 1.25rem !important;
}

/* Category / content panels */
.wrap-content {
    padding: 24px;
    margin-bottom: 22px;
    border: 1px solid rgba(15, 23, 42, .055);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .025);
}

/* Category headings */
.wrap-content .hero-title h2 {
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.015em;
}

/* Category + tool descriptions */
.wrap-content .hero-title p {
    margin-top: .65rem;
    margin-bottom: 1rem;
    font-size: 16px !important;
    line-height: 1.6;
    color: #64748b;
}

/*
|--------------------------------------------------------------------------
| Homepage Tool Grid
|--------------------------------------------------------------------------
*/

/* Replace MonsterTools float layout with a proper grid */
.products ul.items.grid-view {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Override the Canvas 150px desktop card height */
.products ul.items.grid-view > li {
    float: none !important;
    width: auto !important;
    height: auto !important;
    min-height: 112px;
    margin: 0 !important;
    padding: 0 !important;

    border: 1px solid #edf0f3;
    border-radius: 11px;

    background: #f8fafc;

    box-shadow: none;

    overflow: hidden;

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease;
}

.products ul.items.grid-view > li:hover {
    transform: translateY(-2px);

    border-color: rgba(13, 148, 213, .25);

    background: #ffffff;

    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}

/* Entire card clickable area */
.products ul.items.grid-view > li > a {
    min-height: 112px;
    width: 100%;

    padding: 18px 14px !important;

    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 9px;

    color: inherit;
}

/* Tool icons */
.products ul.items.grid-view > li > a i {
    font-size: 32px !important;
    line-height: 1;
}

.products ul.items.grid-view > li > a img {
    width: 32px !important;
    max-width: 32px !important;
    max-height: 32px;
    object-fit: contain;
}

/* Tool names */
.products ul.items.grid-view > li > a span {
    display: block;

    padding-top: 0 !important;

    font-size: 15px !important;
    line-height: 1.4;

    font-weight: 600;

    text-align: center;
}

/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

.top-navbar {
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.top-navbar .navbar-brand img {
    max-height: 64px !important;
    width: auto;
}

/* Desktop search field */
@media (min-width: 768px) {

    .top-navbar .search-wrap input.form-control {
        min-width: 320px;
        min-height: 42px;

        padding: 9px 13px;

        font-size: 14px;

        border-radius: 9px;
        border-color: #d9dee5;

        box-shadow: none;
    }

    .top-navbar .search-wrap input.form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(13, 148, 213, .08);
    }
}

/*
|--------------------------------------------------------------------------
| Dark Mode
|--------------------------------------------------------------------------
*/

[theme-mode="dark"] .wrap-content {
    border-color: rgba(255, 255, 255, .08);
}

[theme-mode="dark"] .wrap-content .hero-title p {
    color: rgba(255, 255, 255, .68);
}

[theme-mode="dark"] .products ul.items.grid-view > li {
    background: rgba(255, 255, 255, .035);
    border-color: rgba(255, 255, 255, .08);
}

[theme-mode="dark"] .products ul.items.grid-view > li:hover {
    background: rgba(255, 255, 255, .065);
    border-color: rgba(255, 255, 255, .15);
}

/*
|--------------------------------------------------------------------------
| Responsive Grid
|--------------------------------------------------------------------------
*/

@media (max-width: 991.98px) {

    .products ul.items.grid-view {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 767.98px) {

    .wrap-content {
        padding: 20px 16px;
        margin-bottom: 16px;
    }

    .products ul.items.grid-view {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .products ul.items.grid-view > li,
    .products ul.items.grid-view > li > a {
        min-height: 105px;
    }

    .products ul.items.grid-view > li > a {
        padding: 15px 10px !important;
    }

    .products ul.items.grid-view > li > a span {
        font-size: 14px !important;
    }

}

@media (max-width: 420px) {

    .products ul.items.grid-view {
        grid-template-columns: 1fr;
    }

}


/*
|--------------------------------------------------------------------------
| Homepage Loader Guard
|--------------------------------------------------------------------------
| MonsterTools includes a full-screen #app-loader.
| The homepage does not need it, so prevent intermittent overlay flashes.
*/

html.iwt-home #app-loader {
    display: none !important;
}
