/*General*/
.byg-hidden {
    display: none;
}

.byg-visible {
    display: block;
}

/*BYG h4 headings directly child of div*/
div > h4 {
    font-weight: 600;
}

/*Product group colour swatch section*/
#byg-selected-colour {
    font-weight: 700;
}

.byg-colour-swatch {
    hr {
        border-color: #000;
    }
}
.byg-colour-swatch hr:first-of-type {
    margin-bottom: 10px;
}
.byg-colour-swatch :last-child {
    margin-top: 10px;
}

/* Visually hide radios but keep them accessible */
.swatch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* The swatch itself */
.swatch-label {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #ccc;
    margin: 4px;
    cursor: pointer;
    box-sizing: border-box;
}

/* Selected state */
.swatch-input:checked + .swatch-label {
    border-color: #000;
    outline: 2px solid #000; /* nice, obvious ring */
}

/* Keyboard focus on the hidden input */
.swatch-input:focus + .swatch-label {
    outline: 2px solid #5cb85c;
    outline-offset: 2px;
}

/*BYG Size selector area*/
.byg-size-selector {
    hr {
        border-color: #000;
    }
}
.byg-size-selector hr:first-of-type {
    margin-bottom: 10px;
}

#byg-staff-pack-wrapper {
    display: flex;
    flex-direction: column;
    margin-top: 2rem;
    label {
        font-weight: 700;
        font-size: 1.25rem;
    }
    input {
        background-color: #f5f5f5;
        border: 1px solid lightgray;
        padding: 1.5rem;
        border-radius: 5px;
    }
    #byg-staff-pack-info:focus {
        outline: 2px solid #5cb85c;
    }
}

#byg-size-selector-group {
    /*Main wrapper for size selector*/
    display: flex;
    flex-wrap: nowrap;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    .byg-size-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 50px;
        overflow-x: auto;
        column-gap: 10px;
        /*margin-bottom: 7px;*/

        span {
            text-align: center;
            width: 50px;
            height: 20px;
            font-weight: bold;
        }
    }

    .byg-qty-grid {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 50px;
        overflow-x: auto;
        column-gap: 10px;
        padding: 2px;

        input {
            width: 50px;
            height: 40px;
            text-align: left;
            background-color: #f5f5f5;
            border: 2px solid lightgray;
            padding-left: 0.5rem;
            border-radius: 5px;
        }
        input:focus {
            outline: 2px solid #5cb85c;
        }
    }
}

/*Logo Customisation Selection Wrapper*/
#byg-customisation-wrapper {
    h4 > span {
        font-size: 1.25rem;
    }
    hr {
        border-color: #000;
    }
    p {
        font-weight: 600;
    }

    /* The Grid Layout */
    .byg-template-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }

    /* The Individual Card */
    .byg-template-card {
        border: 1px solid #e0e0e0;
        border-radius: 4px;
        padding: 10px;
        width: 130px; /* Or whatever width you need */
        cursor: pointer;
        position: relative; /* CRITICAL for the absolute tick */
        background: #fff;
        transition: all 0.2s ease;
        text-align: center;
    }

    /* Hover Effect */
    .byg-template-card:hover {
        border-color: #aaa;
    }

    /* --- THE SELECTED STATE --- */
    /* When the card has the class 'selected', turn the border green */
    .byg-template-card.selected {
        border-color: #28a745; /* Green border */
        background-color: #f9fff9; /* Optional faint green tint */
    }

    .byg-template-image-wrapper {
        img {
            max-height: 100px;
        }
    }

    /* The Tick Icon Container */
    .byg-template-selected-tick {
        position: absolute;
        bottom: 8px;   /* Position at bottom right */
        right: 8px;
        width: 24px;
        height: 24px;
        background-color: #28a745; /* Green circle background */
        border-radius: 50%;
        display: none; /* HIDDEN BY DEFAULT */
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    /* The Tick SVG styling */
    .byg-template-selected-tick svg {
        fill: white;
        width: 16px;
        height: 16px;
    }

    /* REVEAL the tick only when the parent has '.selected' */
    .byg-template-card.selected .byg-template-selected-tick {
        display: flex; /* Reveals the tick */
    }

}

/*Logo Placement Cards*/
.byg-placement-card {
    display: flex;
    flex-direction: row;
    margin-bottom: 2rem;
    min-height: 200px;
    position: relative;

    .byg-placement-removal {
        position: absolute;
        top: 0;
        right: 0;
        border-radius: 15px;
    }

    .byg-placement-removal svg:hover {
        transform: scale(1.25);
    }

    .byg-card-cols {
        min-width: 200px;
        min-height: 200px;
        display: flex;
        flex-direction: column;
    }

    .byg-card-cols:first-child {
        min-width: 200px;
    }
    .byg-card-cols:last-child {
        min-width: 200px;
    }

    .byg-card-cols:nth-child(2) {

    }

    .byg-card-cols:nth-child(n + 2) {
        padding-left: 1rem;
    }
}

.byg-card-content {
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;

}

.byg-left-card > .byg-card-content {
    /*border-right: 1px solid #000;*/

    div:first-child {
        /*width: 30%;*/
    }

    div:nth-child(2) {
        /*width: 70%;*/
    }
}

.byg-left-card-content {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.byg-left-card-header-validation-error {
    color: rgb(211,47,47);
}

.byg-left-card-content-logo {
    position: relative;

    img {
        width: 60px;
    }

    svg {
        position: absolute;
        right: 0;
        bottom: 0;
        background-color: #28a745;
        border-radius: 50%;
        fill: #fff;
        height: 16px;
        width: 16px;
    }
}

.byg-left-card-content-selectors {
    margin-left: 1rem;
    width: 90%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.byg-left-card-content-radios {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;

    label {
        padding: 0;
        margin: 0;
    }

    input {
        padding: 0;
        margin: 0;
    }
}

.byg-mid-card-content {
    border-right: 1px solid #000;
    border-left: 1px solid #000;
    padding: 0 1rem;
}

.byg-right-card {
    position: relative;

    .byg-right-card-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        .byg-right-card-content-logo-upload-button-wrapper {
            margin: 1rem 0 2rem 0;
        }

        .byg-right-card-content-logo-upload-card {
            width: 70%;
            min-height: 100px;
            border: 1px solid #e0e0e0;
            border-radius: 15px;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            position: relative;

            .byg-right-cclu-logo > img {
                max-width: 100px;
                max-height: 100px;
                object-fit: contain;
            }

            .byg-right-cclu-filename {
                margin-top: 1rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                max-width: 100%;
            }

            .byg-right-cclu-trashcan {
                position: absolute;
                top: 5px;
                right: 5px;
            }

            .byg-right-cclu-trashcan:hover {
                transform: scale(1.1);
            }
        }
    }
}

/*BYG Add To Basket Section*/
#byg-add-to-basket-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 10px;
    background-color: #f5f5f5;
    #byg-price-wrapper {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        .byg-currency {
            font-size: 3rem;
            font-weight: 600;
        }
        #byg-price {
            font-size: 3rem;
            font-weight: 600;
        }
        #vat-status {
            font-size: 1rem;
            font-weight: bold;
            color: lightgray;
            margin-left: 5px;

        }
    }
}
