.giglist {
    --pic-width: 320px;
    --pic-height: 440px;
    --background: whitesmoke;
    --header-color: #303030;
    --header-text: white;
}


.giglist>.gigs .gig .gigpic>img.expand-image {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: black;
    object-fit: contain;
    z-index: 3000;
    scale: 0.97;
}


.giglist {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.49;
}


.giglist {
    background-color: whitesmoke;
}

.giglist * {
    box-sizing: border-box;
}



.giglist {
    margin: 0 auto;
    max-width: 96vw;
}

.giglist>.gigs {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    gap: 20px;
    padding: 10px;
    color: black;
}

.giglist:not(.strip)>.gigs {
    flex-wrap: wrap;
}

.gigpic>img {
    width: var(--pic-width);
    max-width: 100%;
    transition: all 0.3s;
}

.gigpic>img:hover {
    transform: scale(1.01);
}

.gig>div {
    width: var(--pic-width);
    object-fit: contain;
}

.giglist.align-bottom {
    &>.gigs {
        align-items: flex-end;
    }

    .gigpic>img {
        height: auto;
    }
}

.giglist.align-top {
    &>.gigs {
        align-items: flex-start;
    }

    .gigpic>img {
        height: auto
    }
}

.giglist.align-base {
    &>.gigs {
        align-items: baseline;
    }

    .gigpic>img {
        height: auto
    }
}

.giglist.align-cover {
    .gigpic>img {
        object-fit: cover;
        height: var(--pic-height);
    }
}

.giglist.align-columns {
    .gigs {
        gap: 2%;
    }

    .gig>div {
        width: 100%;
    }

    .gig>.gigpic>img {
        width: 100%;
    }

    .gig {
        margin: 20px 0;
    }
}



.giglist .controls {
    text-align: right;
    position: fixed;
    bottom: 5px;
    right: 15px;
    background-color: transparent;
    z-index: 2000;
}

.giglist .controls>label,
.giglist button {
    padding: 6px;
    color: white;
    background-color: dodgerblue;
    border-radius: 5px;
    border: 0;
}

.giglist .controls>label *,
.giglist .controls>label {
    font-size: smaller;
    margin: 2px 2px 0 2px;
}

.giglist:not(.editing) .alignment-control {
    display: none;
}

.giglist button:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    border: 1px solid blue;
    font-weight: bold;
}

.giglist.editing .gig-field {
    border: 1px solid grey;
}


.giglist.editing #editButton {
    border: 1px solid red;
    background-color: yellow;
    color: black;
}

.giglist:not(.editing) .unlessEditing {
    display: none;
}

.giglist.editing .prop-show {
    display: none;
}

.giglist.editing .prop-edit {
    display: block !important;
}

.prop-edit {
    font-size: small;
}

.giglist.edit-in-progress #editButton {
    background-color: red;
    color: pink;
}

.gig {
    background-color: white;
    color: black;
    position: relative;
    border: 1px solid black;
    border-radius: 10px;
    /* box-shadow: 5px 5px lightgray; */
    overflow: clip;
}

.gig>.prop-show:first-child {font-weight: bold;
    color: var(--header-text);
    background-color: var(--header-color);
    padding: 4px 10px;
    box-shadow: 0 1px var(--header-color);
    z-index: 2;
    position: relative;
}

.giglist:not(.strip) .gig {
    overflow: hidden;
}

.giglist.strip {
    position: relative;
    max-width: 100%;
}

.giglist.strip>.gigs {
    overflow: scroll;
    scrollbar-width: none;
}

.giglist.strip>.controls {
    display: none;
}

.gig input {
    border: 0;
}

.dtstart,
.dtend {
    width: 8em;
}



.gig>div {
    padding: 0 6px;
}

.gig-title {
    font-size: large;
}

.gig-dtinfo {
    width: 100%;
}

.gig.onedate .gig-dtend-group {
    opacity: 0.5;
}

.gig.onedate.recurs .gig-dtend-group::after {
    content: "forever";
    font-size: small
}

.gig.locallink .gig-bookinglink-group {
    opacity: 0.2;
}

.invalid-field {
    outline: 1px solid red;
}

span.recurrence {
    font-size: small;
    text-wrap-mode: nowrap;
}

.venuebooking input {
    float: right;
}


.gig .bookbutton {
    float: right;
    background-color: var(--header-color) !important;
    border: 1px solid black;
    color: var(--header-text) !important;
    border-radius: 2px;
    position: relative;
}

.gig .bookbutton::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    height: 10px;
    width: 10px;
    border-top: 1px solid var(--header-text);
    border-right: 1px solid var(--header-text);
}

.giglist.editing .bookbutton {
    display: none;
}

.gigpic {
    position: relative;
    padding: 0;
    margin-top: -1px;
}

.gigpic>img {
    border-top: 1px solid lightgray;
    border-bottom: 1px solid lightgray;
    cursor: nesw-resize;
}

.gigpic>.overlay {
    position: absolute;
    top: 0;
    left: 0;
}

.gig-controls {
    position: absolute;
    top: 20px;
    right: 0;
    display: flex;
    justify-content: flex-end;
}

.delete-button {
    inset: 1px solid red;
}

.prop-edit>* {
    margin: 0 4px;
    padding: 4px;
}

pre {
    font-size: small;
}

/* Set this during clicked scroll in .horizontal .eventList.
    But don't set while dragging - bad effect.
*/
.smoothie {
    scroll-behavior: smooth;
}

@media (min-width: 700px) {
    .sa_scrollButton {
        font-size: 32px;
        font-weight: bold;
        position: absolute;
        top: 90px;
        width: 30px;
        height: 60px;
        color: rgb(80, 80, 80);
        cursor: pointer;
        /*border: 3px solid rgb(196, 196, 196);
            box-shadow: 0 0 0 2px rgb(255,255,255);*/
        background-color: rgba(255, 255, 255, 0.8);
        border-radius: 0;
        user-select: none;
        text-align: center;
        vertical-align: middle;
        line-height: 60px;
    }

    .sa_scrollerLeft {
        left: auto;
        right: 0;
        margin-right: -15px;
    }

    .sa_scrollerRight {
        left: 0;
        right: auto;
        margin-left: -15px;
    }

    .sa_horizontal_activities {
        position: relative;
    }
}

@media (max-width: 700px) {
    .sa_scrollButton {
        display: none;
    }

    .giglist.strip .gigs>.gig:not(:first-child) {
        display: none;
    }
}

/* Gig content display */
.gig-content-wrapper {
    position: relative;
}

.gig-content-wrapper:has(.gig-content:empty) {
    display: none;
}

.gig-content {
    padding: 6px;
    font-size: 0.9em;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: pre-line;
    cursor: pointer;
}

.gig-content:empty {
    display: none;
}

.gig-content-full {
    display: none;
    cursor: default;
}

.gig-content-full[data-locallink="true"] {
    cursor: pointer;
}

.gig-content-wrapper.expanded .gig-content-full {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 50vh;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px 4px 0 0;
    padding: 12px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    font-size: 0.9em;
    line-height: 1.5;
    white-space: pre-line;
}

/* Show expanded content on hover for devices that support it */
@media (hover: hover) {
    .giglist:not(.editing) .gig-content-wrapper:hover .gig-content-full {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 50vh;
        overflow-y: auto;
        background-color: white;
        border: 1px solid #ccc;
        border-radius: 4px 4px 0 0;
        padding: 12px;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        z-index: 100;
        font-size: 0.9em;
        line-height: 1.5;
        white-space: pre-line;
    }
}

.giglist.editing .gig-content-wrapper {
    display: block !important;
}

.giglist.editing .gig-content {
    cursor: pointer;
    background-color: #f5f5f5;
    border: 1px dashed #ccc;
}

.giglist.editing .gig-content:empty {
    display: block;
}

.giglist.editing .gig-content:empty::before {
    content: "Add description...";
    color: #999;
    font-style: italic;
}

.giglist.editing .gig-content:hover {
    background-color: #e8f4fc;
    border-color: #69c;
}

.giglist.editing .gig-content-full {
    display: none !important;
}