
@font-face {
    font-family: 'THFont';
    src: url('../fonts/THFont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

#lifebuoy-svg text {
    font-family: 'THFont', Arial, sans-serif;
}
/* Lifebuoy Customizer Styles */

/* Gallery integration */
.lifebuoy-svg-gallery-item {
    position: relative;
}

.lifebuoy-svg-image {
    display: block;
    width: 100%;
    height: auto;
}

.lifebuoy-svg-link {
    display: block;
    cursor: pointer;
}

/* Ensure SVG scales properly in gallery */
.woocommerce-product-gallery .lifebuoy-svg-gallery-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Hidden SVG container */
#lifebuoy-svg-container {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
}

/* Thumbnail styling */
.flex-control-thumbs .lifebuoy-svg-gallery-item img {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.flex-control-thumbs .lifebuoy-svg-gallery-item img:hover {
    opacity: 0.7;
}

/* Ensure SVG appears as first item in gallery */
.lifebuoy-svg-gallery-item {
    order: -1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lifebuoy-svg-image {
        max-width: 100%;
    }
}

/* Animation when text updates */
@keyframes svgUpdate {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.lifebuoy-svg-image.updating {
    animation: svgUpdate 0.3s ease;
}

/* Custom field styling (optional) */
.wcpa_form_outer {
    margin: 20px 0;
}

/* Loading state */
.lifebuoy-svg-link.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}