/*
|--------------------------------------------------------------------------
| 1. Portal rodzinny - baza
|--------------------------------------------------------------------------
*/

.ftree-access-shell,
.ftree-access-shell * {
    box-sizing: border-box;
}

.ftree-access-shell {
    --ftree-access-ink: #2f251d;
    --ftree-access-muted: #75695f;
    --ftree-access-brown: #5d3824;
    --ftree-access-brown-dark: #342118;
    --ftree-access-olive: #59652f;
    --ftree-access-cream: #f7f1e7;
    --ftree-access-paper: #fffdf8;
    --ftree-access-line: #ded3c4;
    --ftree-access-alert: #8f352d;
    width: min(100%, 1320px);
    margin: 24px auto 44px;
    color: var(--ftree-access-ink);
    font-family: Georgia, "Times New Roman", serif;
}

.ftree-access-shell a {
    text-decoration: none;
}

/*
|--------------------------------------------------------------------------
| 2. Hero bez osobnego panelu logowania
|--------------------------------------------------------------------------
*/

.ftree-access-hero {
    position: relative;
    min-height: 430px;
    padding: 66px 58% 60px 62px;
    overflow: hidden;
    border: 1px solid #cfc1ae;
    border-radius: 24px;
    background:
        radial-gradient(circle at 16% 18%, rgba(255, 255, 255, .90), transparent 32%),
        linear-gradient(110deg, #fbf6ed 0%, #eee3d2 58%, #d7c7ae 100%);
    box-shadow: 0 22px 54px rgba(58, 39, 26, .12);
}

.ftree-access-hero::before {
    content: "";
    position: absolute;
    right: -4%;
    bottom: -28%;
    width: 62%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(89, 101, 47, .14) 0%, rgba(89, 101, 47, .05) 44%, transparent 70%);
    pointer-events: none;
}

.ftree-access-hero-copy {
    position: relative;
    z-index: 2;
}

.ftree-access-eyebrow {
    display: inline-block;
    margin: 0 0 18px;
    color: var(--ftree-access-olive);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .18em;
}

.ftree-access-hero-copy h1 {
    max-width: 620px;
    margin: 0 0 24px;
    color: var(--ftree-access-brown-dark);
    font-size: clamp(44px, 5.4vw, 72px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.ftree-access-hero-copy > p {
    max-width: 570px;
    margin: 0;
    color: #61564d;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.72;
}

.ftree-access-hero-mark {
    position: absolute;
    z-index: 1;
    right: 7%;
    bottom: -5%;
    width: min(39%, 440px);
    color: rgba(72, 77, 37, .26);
    filter: drop-shadow(0 16px 20px rgba(71, 54, 31, .08));
    pointer-events: none;
}

.ftree-access-hero-mark svg,
.ftree-access-card-icon svg {
    display: block;
    width: 100%;
    height: auto;
}

/*
|--------------------------------------------------------------------------
| 3. Kafelki drzew
|--------------------------------------------------------------------------
*/

.ftree-access-families {
    padding: 46px 2px 0;
}

.ftree-access-section-heading {
    margin: 0 0 24px;
    text-align: center;
}

.ftree-access-section-heading h2 {
    margin: 0;
    color: var(--ftree-access-brown-dark);
    font-size: clamp(30px, 3.6vw, 43px);
    font-weight: 500;
}

.ftree-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.ftree-access-card {
    position: relative;
    display: flex;
    min-height: 316px;
    padding: 24px 20px 20px;
    flex-direction: column;
    align-items: center;
    border: 1px solid #dfd1bd;
    border-radius: 14px;
    background: rgba(255, 253, 248, .96);
    box-shadow: 0 10px 26px rgba(71, 47, 29, .06);
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ftree-access-card:hover {
    border-color: #bda88b;
    box-shadow: 0 14px 32px rgba(71, 47, 29, .10);
    transform: translateY(-2px);
}

.ftree-access-card.is-selected {
    border-color: var(--ftree-access-olive);
    box-shadow: 0 0 0 2px rgba(89, 101, 47, .10), 0 14px 32px rgba(71, 47, 29, .10);
}

.ftree-access-card-check {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 50%;
    background: var(--ftree-access-olive);
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    font-weight: 800;
}

.ftree-access-card-icon {
    width: 112px;
    margin: 0 auto 12px;
    color: #677044;
}

.ftree-access-card h3 {
    margin: 0 0 9px;
    color: var(--ftree-access-brown-dark);
    font-size: 23px;
    font-weight: 500;
    line-height: 1.15;
}

.ftree-access-card p {
    min-height: 44px;
    margin: 0 0 20px;
    color: var(--ftree-access-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.55;
}

.ftree-access-card-action {
    display: flex;
    width: 100%;
    min-height: 44px;
    margin-top: auto;
    padding: 10px 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid #c9b795;
    border-radius: 8px;
    background: #fffdf9;
    color: #4d5c2c;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.ftree-access-card-action:hover,
.ftree-access-card-action:focus-visible {
    border-color: var(--ftree-access-olive);
    background: #f4f2e8;
    color: #35401f;
}

/*
|--------------------------------------------------------------------------
| 4. Jedno logowanie pod kafelkami
|--------------------------------------------------------------------------
*/

.ftree-access-login-bottom {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(0, 1.65fr);
    gap: 26px;
    margin-top: 28px;
    padding: 24px 26px;
    align-items: center;
    border: 1px solid #e0d4c1;
    border-radius: 14px;
    background: rgba(255, 251, 243, .96);
    box-shadow: 0 12px 28px rgba(71, 47, 29, .06);
}

.ftree-access-login-copy {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.ftree-access-login-icon {
    display: grid;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    place-items: center;
    border-radius: 50%;
    background: #efe3cd;
    color: #805b22;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 22px;
}

.ftree-access-login-copy h2 {
    margin: 1px 0 7px;
    color: var(--ftree-access-brown-dark);
    font-size: 24px;
    font-weight: 500;
}

.ftree-access-login-copy p {
    margin: 0;
    color: var(--ftree-access-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.55;
}

.ftree-access-selected-tree {
    grid-column: 2;
    margin: -6px 0 0;
    padding: 9px 12px;
    border: 1px solid #d9cfb8;
    border-radius: 8px;
    background: #f2efe2;
    color: #4e552e;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.ftree-access-selected-tree.is-empty {
    color: #7b6f64;
}

.ftree-access-alert {
    grid-column: 2;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid rgba(143, 53, 45, .28);
    border-radius: 9px;
    background: rgba(143, 53, 45, .07);
    color: var(--ftree-access-alert);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.ftree-access-form-inline {
    grid-column: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.ftree-access-field {
    min-width: 0;
}

.ftree-access-form label {
    display: block;
    margin: 0 0 6px;
    color: #4e4137;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 800;
}

.ftree-access-form input[type="email"],
.ftree-access-form input[type="password"] {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid #cfc2b2;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #33281f;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.ftree-access-form input[type="password"] {
    padding-left: 42px;
}

.ftree-access-form input:focus {
    border-color: #8d715a;
    box-shadow: 0 0 0 3px rgba(93, 56, 36, .10);
}

.ftree-access-password-wrap {
    position: relative;
}

.ftree-access-lock {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 13px;
    color: #786653;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    transform: translateY(-50%);
    pointer-events: none;
}

.ftree-access-form button,
.ftree-access-account-logout {
    display: inline-flex;
    min-height: 46px;
    padding: 11px 22px;
    align-items: center;
    justify-content: center;
    border: 1px solid #4f5d2b;
    border-radius: 8px;
    background: #4f5d2b;
    color: #fffdf7;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .07em;
    cursor: pointer;
}

.ftree-access-form button:hover,
.ftree-access-form button:focus-visible,
.ftree-access-account-logout:hover,
.ftree-access-account-logout:focus-visible {
    background: #39451f;
    color: #fff;
}

.ftree-access-form button:disabled,
.ftree-access-form input:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.ftree-access-account-logout {
    justify-self: end;
}

/*
|--------------------------------------------------------------------------
| 4A. Moduły do samodzielnego układania w Gutenberg / Spectra
|--------------------------------------------------------------------------
*/

.ftree-access-module,
.ftree-access-module * {
    box-sizing: border-box;
}

.ftree-access-module {
    --ftree-access-ink: #2f251d;
    --ftree-access-muted: #75695f;
    --ftree-access-brown: #5d3824;
    --ftree-access-brown-dark: #342118;
    --ftree-access-olive: #59652f;
    --ftree-access-cream: #f7f1e7;
    --ftree-access-paper: #fffdf8;
    --ftree-access-line: #ded3c4;
    --ftree-access-alert: #8f352d;
    width: 100%;
    margin: 0;
    padding: 0;
    color: var(--ftree-access-ink);
}

.ftree-access-module a {
    text-decoration: none;
}

.ftree-access-cards-module .ftree-access-grid {
    width: 100%;
}

.ftree-access-login-module .ftree-access-selected-tree,
.ftree-access-login-module .ftree-access-alert,
.ftree-access-login-module .ftree-access-form-inline {
    grid-column: auto;
}

.ftree-access-login-module .ftree-access-selected-tree,
.ftree-access-login-module .ftree-access-alert {
    margin-bottom: 12px;
}

.ftree-access-login-module .ftree-access-form-inline {
    margin: 0;
}

.ftree-access-module-account {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ftree-access-module-status {
    color: var(--ftree-access-muted);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

.ftree-access-login-module .ftree-access-account-logout {
    justify-self: auto;
}

/*
|--------------------------------------------------------------------------
| 5. Pasek otwartego drzewa
|--------------------------------------------------------------------------
*/

.ftree-access-open-tree {
    width: 100%;
}

.ftree-access-open-tree-bar {
    display: flex;
    width: min(100% - 24px, 1180px);
    margin: 16px auto;
    padding: 12px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #ddd1bf;
    border-radius: 12px;
    background: #fcf8f0;
    color: #382b21;
    font-family: Arial, Helvetica, sans-serif;
}

.ftree-access-open-tree-info {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.ftree-access-open-tree-label {
    color: #8a7a6a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ftree-access-open-tree-info strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ftree-access-open-tree-actions {
    display: flex;
    align-items: center;
}

.ftree-access-logout {
    display: inline-flex;
    min-height: 38px;
    padding: 8px 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cab9a0;
    border-radius: 8px;
    background: #fffdf8;
    color: #4a382b;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 800;
}

.ftree-access-logout:hover,
.ftree-access-logout:focus-visible {
    border-color: #a88e75;
    background: #f7efe3;
    color: #3d2418;
}

/*
|--------------------------------------------------------------------------
| 6. Responsywność
|--------------------------------------------------------------------------
*/

@media (max-width: 980px) {
    .ftree-access-hero {
        min-height: 380px;
        padding: 48px 44% 48px 42px;
    }

    .ftree-access-hero-mark {
        right: 2%;
        width: 43%;
    }

    .ftree-access-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ftree-access-login-bottom {
        grid-template-columns: 1fr;
    }

    .ftree-access-selected-tree,
    .ftree-access-alert,
    .ftree-access-form-inline {
        grid-column: 1;
    }

    .ftree-access-form-inline {
        grid-template-columns: 1fr 1fr;
    }

    .ftree-access-form-inline button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .ftree-access-shell {
        margin-top: 12px;
        margin-bottom: 28px;
    }

    .ftree-access-hero {
        min-height: 0;
        padding: 34px 22px 190px;
        border-radius: 16px;
    }

    .ftree-access-hero-copy h1 {
        font-size: clamp(38px, 12vw, 52px);
    }

    .ftree-access-hero-copy > p {
        font-size: 15px;
    }

    .ftree-access-hero-mark {
        right: 22%;
        bottom: -16%;
        width: 56%;
    }

    .ftree-access-families {
        padding-top: 34px;
    }

    .ftree-access-grid {
        grid-template-columns: 1fr;
    }

    .ftree-access-card {
        min-height: 285px;
    }

    .ftree-access-login-bottom {
        gap: 18px;
        padding: 20px 16px;
    }

    .ftree-access-form-inline {
        grid-template-columns: 1fr;
    }

    .ftree-access-form-inline button {
        grid-column: auto;
        width: 100%;
    }

    .ftree-access-account-logout {
        justify-self: stretch;
    }

    .ftree-access-open-tree-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .ftree-access-open-tree-info {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .ftree-access-open-tree-info strong {
        max-width: 100%;
    }
}

/*
|--------------------------------------------------------------------------
| 7. Osobny widok drzewa - bez stopki motywu
|--------------------------------------------------------------------------
*/

.ftree-open-tree-layout #colophon,
.ftree-open-tree-layout .site-footer,
.ftree-open-tree-layout .ast-footer-overlay {
    display: none !important;
}

/*
|--------------------------------------------------------------------------
| W16.4.2I - Wlasna grafika kafelka drzewa
|--------------------------------------------------------------------------
*/
.ftree-access-card-icon.has-custom-image {
    display: flex;
    width: 100%;
    max-width: 240px;
    height: 130px;
    margin: 0 auto 14px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ftree-access-card-icon.has-custom-image .ftree-access-card-image {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}
