.shp-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    max-height: 250px;
    overflow: hidden;
}

.shp-content .content {
    flex-grow: 1;
    max-height: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Container for the editable area and tooltip */
.editable-container {
    position: relative;
    display: inline-block;
}

/* Tooltip styling */
.tooltip {
    visibility: hidden;
    background-color: transparent;
    color: #fff;
    text-align: left;
    border-radius: 4px;
    padding: 8px;
    position: relative;
    z-index: 1000;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

/* Tooltip arrow */
.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Show tooltip on hover */
.editable-container:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Editable text styling */
#fl-share-text {
    cursor: pointer;
    border: 1px solid transparent;
}

#fl-share-text:hover {
    border: 1px dashed #ccc;
}

/* Textarea styling for editing */
textarea {
    width: 100%;
    height: 100px;
    padding: 5px;
    font-family: inherit;
    font-size: inherit;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: gray;
}

.shp-qr {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 90px;
    height: 90px;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
}

.shp-content .content {
    width: 100%;
    float: left;
    display: inline-block;
}

.shp-content .content h3 {
    color: #40a829;
    margin: 0;
    padding: 0.5em;
    text-transform: uppercase;
}

.shp-content .content p {
    margin: auto;
    padding: 0 2em;
    overflow-y: auto;
}

#fl-share-content-area {
    position: relative;
    height: 530px;
    width: 514px;
    margin-left: calc(50% - 257px);
    overflow: hidden;
}

#fl-share-content-area .frame-overlay {
    background-image: url("../images/share_pic_frame/1.png");
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 5px;
    background-position: bottom;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

div#shpshareModal .upddt {
    text-align: center;
    display: flex;
    margin: 1em auto 0;
}

div#shpshareModal div#fl-share-social-bar-holder {
    position: relative;
    display: none;
    z-index: 1;
}

div#shpshareModal div#fl-share-social-bar-holder div.shareon.fl-share-button-area {
    width: 24px;
    min-height: 200px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: .9;
}

.fl-share-action-area-wrapper {
    display: flex;
    flex-direction: column;
}

input#fl-share-pick-color {
    margin-left: 1em;
    margin-right: 1em;
}

button.fl-social-copy-link {
    background: #5cb85c;
    color: white;
}

button.fl-share-social-share {
    background: #5cb85c;
    color: white;
}

a.fl-share-social-start {
    color: white !important;
    background-color: #40a829 !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    padding: 8px 20px !important;
    border-radius: 5px !important;
    border: 0 !important;
}

div#fl-share-this {
    position: relative;
    padding: 0;
}

div#fl-share-this div#share-no-image-text {
    padding: 2em;
    font-weight: bold;
    height: 100%;
    display: inline-block;
}

div#fl-share-this div#share-no-image-text p {
    line-height: 1.5em;
    height: 9em;
    text-align: center;
    overflow-y: hidden;
}

div#fl-share-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1em;
}

div#fl-share-header span.fl-share-display-link {
    font-weight: bold;
    margin-top: 1em;
    display: inline-block;
}

div#fl-share-header div#fl-share-copy-button-area {
    display: flex;
    justify-content: center;
    flex-direction: column;
}

/* Main details container - bottom anchored */
div#fl-share-details {
    color: rgb(255, 255, 255);
    padding: 15px 10px 15px 20px;
    display: flex;
    width: auto;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: auto;
    min-height: auto;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 0;
}

div#fl-share-details > * {
    margin-top: auto;
    margin-bottom: auto;
}

/* Main wrapper for content */
.main-detail-wrapper {
    display: flex;
    width: 100%;
    align-items: flex-start;
}

.main-detail-wrapper .detail-text-wrapper {
    margin-right: auto;
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 100px);
    padding-top: 0;
}

/* Title styling to match canvas */
#fl-share-title {
    color: #ffffff;
    line-height: 1.39em; /* Match 25px height with 18px font */
    padding: 0;
    margin: 0 0 0 0;
    font-weight: bold;
    font-size: 18px;
    max-height: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
}

/* Description styling to match canvas */
p#fl-share-text {
    color: #ffffff;
    margin: 10px 0 0 0; /* Match 10px spacing from canvas */
    padding: 0;
    font-size: 14px;
    font-weight: normal;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    max-height: none;
    line-height: 1.43em; /* Match 20px height with 14px font */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    max-width: 100%;
}

/* QR code styling */
div#fl-share-details .shp-qr {
    width: 80px;
    height: 80px;
    padding: 5px;
    margin: 0 0 0 10px;
    border-radius: 5px;
    background-color: #fff;
    flex-shrink: 0;
    align-self: flex-start;
}

div#fl-share-details .shp-qr img {
    width: 70px;
    height: 70px;
    border-radius: 5px;
}

/* Wrapper for details section */
#fl-share-details-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
    box-sizing: border-box;
    padding: 0;
}

#fl-share-details-wrapper > * {
    pointer-events: auto;
}

/* Hide unused elements */
div#fl-share-details #fl-share-line,
.tag-line-wrapper {
    display: none;
}

div#fl-share-this div#fl-share-carousel {
    position: relative;
}

div#fl-share-this div#fl-share-carousel div.fl-share-item {
    text-align: center;
}

div#fl-share-this div#fl-share-background {
    left: auto;
    top: 0;
    width: 100%;
    height: 100%;
    position: absolute;
}

span#fl-share-action-message {
    display: none;
    padding-top: 1.5em;
    padding-left: 1em;
    padding-right: 1em;
    text-align: center;
}

.fl-share-details .content {
    display: flex;
    width: 100%;
}

.fl-share-download-image {
    border-radius: 5px !important;
}

#fl-share-action-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

#fl-share-action-area > * {
    margin-top: auto !important;
    margin-bottom: auto !important;
}

div.modal-dialog div.modal-content div.modal-body button:not(.bootbox-close-button):not(.fl-share-button) {
    margin-top: auto !important;
    margin-bottom: auto !important;
}

#fl-share-action-area .fl-share-download-image {
    margin-right: .4em;
}

#fl-share-action-area img {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: 0 0 8px 0 rgba(64, 64, 64, .20);
}

#fl-share-action-area .frame-select {
    width: 60px;
    position: relative;
}

#fl-share-action-area .frame-select [type=radio] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

#fl-share-action-area .frame-select [type=radio] + img {
    cursor: pointer;
}

#fl-share-action-area .frame-select label {
    margin-bottom: 0;
    position: relative;
}

#fl-share-action-area .frame-select {
    margin-right: auto;
}

#fl-share-action-area .frame-select [type=radio] ~ i {
    display: none;
}

#fl-share-action-area .frame-select [type=radio]:checked ~ i {
    display: block;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    transition: inherit;
    background: #087900;
    position: absolute;
    z-index: 500;
    top: 12px;
    left: 12px;
    color: #fff;
    font-size: 10px;
    padding-top: .2em;
}

#fl-share-carousel img {
    height: 370px;
    top: 0;
    width: 514px;
    object-fit: cover;
    display: block;
}

div.fl-carousel-inner {
    position: relative;
    top: -5px;
}

#fl-share-action-area .frame-picker {
    display: none;
}

#fl-background-list {
    padding-left: 0;
}

#fl-background-list img,
.fl-btn-select img {
    width: 40px;
    height: 40px;
}

#fl-background-list li {
    list-style: none;
    padding-top: 5px;
    padding-bottom: 5px;
}

#fl-background-list li:hover {
    background-color: #F4F3F3;
}

#fl-background-list li img {
    margin: 5px;
}

#fl-background-list li span,
.fl-btn-select li span {
    margin-left: 30px;
}

.fl-background-menu {
    display: none;
    max-width: 350px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 5px;
    position: absolute;
    width: 60px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    -ms-overflow-style: none;
    bottom: 0;
}

.fl-btn-select {
    margin-top: 10px;
    width: 60px !important;
    height: 60px !important;
    min-width: auto !important;
    border-radius: 5px !important;
    background-color: #fff;
    border: 1px solid #ccc;
}

.fl-btn-select li {
    list-style: none;
    float: left;
    padding-bottom: 0;
}

.fl-btn-select:hover li {
    margin-left: 0;
}

.fl-btn-select:hover {
    box-shadow: inset 0 0 0 1px #ccc;
}

.fl-btn-select:focus {
    outline: none;
}

@media (max-width: 767px) {
    #fl-share-content-area {
        width: 100% !important;
        margin-left: 0 !important;
        height: auto !important;
        position: relative !important;
    }

    #fl-share-carousel {
        height: auto !important;
    }

    #fl-share-carousel img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        display: block !important;
    }

    div#fl-share-this {
        padding: 0 !important;
        height: auto !important;
        position: relative !important;
    }

    .frame-overlay {
        position: absolute !important;
        height: 100% !important;
        min-height: auto !important;
    }

    #fl-share-details {
        bottom: 10px !important;
        left: 5px !important;
        right: 5px !important;
        padding: 10px !important;
        min-height: auto !important;
    }

    #fl-share-title {
        font-size: 14px !important;
        line-height: 1.3em !important;
        margin-bottom: 0.3em !important;
    }

    p#fl-share-text {
        font-size: 12px !important;
        line-height: 1.3em !important;
    }

    div#fl-share-details .shp-qr {
        width: 60px !important;
        height: 60px !important;
        padding: 3px !important;
        flex-shrink: 0 !important;
        margin-left: 8px !important;
    }

    div#fl-share-details .shp-qr img {
        width: 54px !important;
        height: 54px !important;
    }

    .main-detail-wrapper {
        width: 100% !important;
    }

    .main-detail-wrapper .detail-text-wrapper {
        max-width: calc(100% - 70px) !important;
        flex: 1 !important;
        padding-top: 0 !important;
    }

    #fl-share-action-area {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    #fl-share-action-area > * {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

.swal2-popup {
    font-size: 1.6rem !important;
}

.swal2-title {
    color: #47ad22 !important;
}

.swal2-icon.swal2-warning.swal2-icon-show {
    max-height: 25vh !important;
    margin-top: 0.5em;
    margin-bottom: 0em;
}