/*  Catalogue download form style */

/* ── Init ── */
#gj-catalog-curtain[hidden],
#gj-catalog-wrap[hidden] {
    display: none !important;
}
#gj-catalog-curtain {
    display: none;
}

/* ── Centered button ── */
section.showreel .image_block.catalogue_lead .imgdesc {
    background-color: #f1f0ef;
    position: absolute;
    top: 50%;
    right: 50%;
    opacity: 1;
    transform: translate(50%, -50%);
    border: 1px solid #8e744b;
    z-index: auto;
    text-align: center;
}
section.showreel .image_block.catalogue_lead .imgdesc > * {
    padding: 14px 20px;
}
section.showreel .image_block.catalogue_lead:hover .imgdesc > * {
    border-color: #f1f0ef;
}

/* ── Panel ── */
#gj-catalog-wrap {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    background: #fff;
    z-index: 9999;
    box-sizing: border-box;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s ease, visibility 0.35s ease;
}
#gj-catalog-wrap.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}
body:has(#gj-catalog-wrap.is-open) {
    overflow: hidden;
}

/* ── Close button — fixed so stays visible on scroll ── */
#gj-catalog-close {
    position: fixed;
    top: 15px;
    right: 15px;
    width: 15px;
    height: 15px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10000;
    color: #B8A999;
}
#gj-catalog-close::before,
#gj-catalog-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: currentColor;
    transform-origin: center;
}
#gj-catalog-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
#gj-catalog-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
#gj-catalog-close:hover {
    color: #8E744B;
}

/* ── Scrollable content ── */
.gj-catalog-inner {
    position: absolute;
    inset: 0;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    /*overscroll-behavior: contain;*/
    touch-action: pan-y;
    background: #fff;
    padding: 15px;
    box-sizing: border-box;
}
.gj-catalog-inner:has(#gj-catalog-form-wrap[hidden]) {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ── Header ── */
.gj-catalog-title {
    font-family: "Archer A", "Archer B", serif;
    font-weight: normal;
    font-size: 36px;
    line-height: 1.25;
    color: #8e744b;
    margin: 0 0 12px;
}
.gj-catalog-subtitle {
    font-size: 16px;
    text-transform: uppercase;
    color: #B8A999;
    margin: 0;
    letter-spacing: 1px;
}

/* ── Form ── */
#gj-catalog-form-wrap {
    /*min-height: 100%;*/
    display: flex;
    flex-direction: column;
}
#gj-catalog-form-wrap[hidden] {
    display: none;
}
.gj-catalog-head {
    flex: 0 0 auto;
    margin-bottom: 28px;
    margin-top: 28px;
    text-align: center;
}
#gj-catalog-form {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.gj-catalog-form-body {
    /*flex: 1 1 auto;*/
    display: flex;
    flex-direction: column;
    /*justify-content: center;*/
}
.gj-catalog-form-footer {
    flex: 0 0 auto;
}
.gj-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
}
.gj-row--phone { 
    grid-template-columns: 90px 1fr;
    column-gap: 0px !important;
}
.gj-row--phone .gj-field:last-child { 
    margin-left: -1px;
}
.gj-field { 
    position: relative; 
    margin-bottom: 10px;
}

/* ── Inputs & selects ── */
.gj-field input[type="text"],
.gj-field input[type="email"],
.gj-field input[type="tel"],
.gj-field select {
    display: block;
    width: 100%;
    background: none;
    border: 1px solid #F2F1F0;
    border-radius: 0;
    padding: 15px;
    font-size: 18px;
    color: #8E744B;
    outline: none;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}
.gj-field input::placeholder { color: #B8A999; }
.gj-field input:focus,
.gj-field select:focus { 
    border-color: #8E744B;
    z-index: 2;
}
.gj-field-error {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #8E744B;
}
.gj-field-error:not([hidden]) {
    margin-top: 6px;
    line-height: 1.4;
}
.gj-field-error:not([hidden])::before {
    content: "";
    flex: 0 0 13px;
    width: 13px;
    height: 10px;
    background-repeat: no-repeat;
    background-size: 13px 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='10' viewBox='0 0 13 10' fill='none'%3E%3Crect x='2.19531' width='12.8571' height='1.28571' transform='rotate(45 2.19531 0)' fill='%238E744B'/%3E%3Crect x='11.2861' y='0.90918' width='12.8571' height='1.28571' transform='rotate(135 11.2861 0.90918)' fill='%238E744B'/%3E%3C/svg%3E");
}
.gj-check .gj-field-error {
    margin-top: 2px;
}
.gj-has-error input,
.gj-has-error select,
.gj-check.gj-has-error input[type="checkbox"] {
    border-color: #8E744B !important;
}

/* ── Select arrow ── */
.gj-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='8' viewBox='0 0 15 8' fill='none'%3E%3Cpath d='M14.1535 0.353516L7.25352 7.25352L0.353516 0.353516' stroke='%238E744B' stroke-miterlimit='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px 8px;
    padding-right: 35px;
    cursor: pointer;
}
.gj-field select:invalid,
.gj-field select:has(option:checked[value=""]) {
    color: #B8A999;
}

/* ── Checkboxes ── */
.gj-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}
.gj-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 19px; 
    height: 19px;
    margin-top: -1px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #F2F1F0;
    border-radius: 0;
    background: #F2F1F0;
    cursor: pointer;
}
.gj-check input[type="checkbox"]:checked {
    background-color: #8E744B;
    border-color: #8E744B;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline points='2,6 5,9 10,3' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px;
}
.gj-check label {
    font-size: 13px;
    color: #B8A999;
    line-height: 18px;
    cursor: pointer;
    display: block;
}
.gj-check label a { color: inherit; text-decoration: underline; }
.gj-check label a:hover { color: #8E744B; }
.gj-check label a:focus { outline: auto; }

/* ── Errors ── */
#gj-catalog-errors {
    font-size: 12px;
    color: #c0392b;
    line-height: 18px;
    margin-top: 0;
    margin-bottom: 14px;
}

/* ── Submit ── */
#gj-catalog-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 28px;
    padding: 18px 24px;
    background: #B8A999;
    letter-spacing: 1px;
    border: none;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}
#gj-catalog-submit:hover:not(:disabled) { background: #8E744B; }
#gj-catalog-submit:disabled { cursor: not-allowed; }

/* ── Success ── */
#gj-catalog-success {
    padding: 0 90px;
    text-align: center; 
}
#gj-catalog-success .gj-catalog-title {
    margin-bottom: 48px;
}
#gj-catalog-success p.gj-success-std {
    font-family: "Archer A", "Archer B", serif;
    font-weight: normal;
    font-size: 18px;
    line-height: 1.25;
    color: #8e744b;
    margin: 0 0 24px;
}
#gj-catalog-success p.gj-success-mini {
    font-size: 13px;
    line-height: 1.2;
    margin-top: 144px;
}
#gj-catalog-success p.gj-success-mini br {
    margin-bottom: 1em;
}
#gj-catalog-success a {
    color: #b8a999;
}
#gj-catalog-success a:hover {
    color: #8e744b;
}

/* ── Accessibility ── */
.gj-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Tablet version ── */
@media (min-width: 768px) { 
	
    /* ── Init ── */
    html.gj-no-scroll-dk {
        overflow-y: scroll;
    }
    html.gj-no-scroll-dk #gj-catalog-curtain {
        overscroll-behavior: contain;
        overflow-y: auto;
    }

	/* ── Centered button ── */
	section.showreel .image_block.catalogue_lead .imgdesc {
		background-color: transparent;
	}
	section.showreel .image_block.catalogue_lead:hover .imgdesc > * {
		background-color: #f1f0ef;
	}

    /* ── Curtain ── */
    #gj-catalog-curtain {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.2);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.28s ease, visibility 0.28s ease;
    }
    #gj-catalog-curtain.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* ── Form ── */
    #gj-catalog-wrap {
        width: 530px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    .gj-catalog-inner {
        position: static;
        flex: 1 1 0%;
        height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: auto;
        background: transparent;
        padding: 75px 65px;
    }
    #gj-catalog-form-wrap {
        min-height: 100%;
    }
    .gj-catalog-form-body {
        flex: 1 1 auto;
        justify-content: center;
    }
	.gj-catalog-form-footer {
		margin-top: auto;
	}
    .gj-row {
        column-gap: 16px;
    }
    .gj-field { 
        margin-bottom: 20px;
    }
	.gj-catalog-head {
		text-align: left;
		margin-top: 0px;
	}

    /* ── Close button — fixed so stays visible on scroll ── */
    #gj-catalog-close {
        top: 35px;
        right: 35px;
        width: 43px;
        height: 43px;
    }
    #gj-catalog-close::before,
    #gj-catalog-close::after {
        width: 58px;
        height: 1.6px;
    }

    /* ── Scrollable content ── */
    .gj-catalog-inner {
        padding: 75px 65px;
    }

    /* ── Checkboxes ── */
    .gj-check {
        margin-top: 20px;
    }

}

@media (max-width: 767px) {

    html.gj-no-scroll {
        background-color: #fff; 
    }
    html.gj-no-scroll body > header,
    html.gj-no-scroll body > main,
    html.gj-no-scroll body > #alt_header,
    html.gj-no-scroll body > footer {
        display: none !important;
    }
    
}