﻿/*********Custom Fields START*************/
/* ensure anchor defines positioning context */
.code-anchor {
    position: relative;
    display: inline-block;
}

/* centered badge */
.fieldCodeWrapper {
    display: none; /* default hidden */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* centers within parent */
    z-index: 9999;
    background: rgba(13, 110, 253, 0.9); /* slightly transparent blue */
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
    font: 700 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    text-align: center;
}

/* When edit mode is active, show */
body.fc-on .fieldCodeWrapper {
    display: inline-flex;
}

/* Badge and copy button */
.fieldCode-badge {
    background: transparent !important;
    border: none;
    color: #fff !important;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.fieldCode-edit {
    cursor: pointer;
}

/* Copied state: green highlight */
.fieldCodeWrapper.copied {
    background: #198754;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.4);
}

    /* “Copied” text */
    .fieldCodeWrapper.copied::after {
        content: "Copied!";
        margin-left: 6px;
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        animation: fadeOut 1s ease-in-out forwards;
    }

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* pulse animation reused */
@keyframes fcPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13,110,253,.45)
    }

    100% {
        box-shadow: 0 0 0 14px rgba(13,110,253,0)
    }
}

.fieldCodeWrapper.fc-pulse {
    animation: fcPulse 1s ease-out 2;
}

/* On small screens, stack below */
@media (max-width: 576px) {
    .fieldCodeWrapper {
        position: static;
        transform: none;
        margin-top: .25rem;
    }
}

/* Hide on print */
@media print {
    .fieldCodeWrapper {
        display: none !important;
    }
}

.fc-hidden {
    display: none !important;
}

/*********Custom Fields END*************/

/********Sweet Alerts***********/
.swal2-title {
    position: relative;
    max-width: 100%;
    margin: 0;
    padding: .8em 1em 0;
    color: inherit;
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
    text-transform: none;
    word-wrap: break-word;
}
.swal2-html-container {
    z-index: 1;
    justify-content: center;
    margin: 1em 1.6em .3em;
    padding: 0;
    color: inherit;
    font-weight: 400;
    line-height: normal;
    word-wrap: break-word;
    word-break: break-word;
}

.swal2-actions {
    display: flex;
    z-index: 1;
    box-sizing: border-box;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: auto;
    margin: 1.25em auto 0;
    padding: 0;
}

.swal2-container.swal2-center > .swal2-popup {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-self: center;
}

/*********Read More elements START*************/
/* container */
.tw-readmore {
    position: relative;
}

/* the collapsible content area we create at runtime */
.tw-readmore__content {
    overflow: hidden;
    transition: max-height 300ms ease;
}

/* nice fade at bottom when collapsed */
.tw-readmore__fade {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 38px; /* leave room for button */
    height: 48px;
    pointer-events: none;
    display: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
}

/* show fade only when collapsed */
.tw-readmore.is-collapsed .tw-readmore__fade {
    display: block;
}

/* toggle button row */
.tw-readmore__toggle {
    margin-top: 6px;
    display: none;
    width: fit-content;
    cursor: pointer;
    user-select: none;
}

/* show button only when needed */
.tw-readmore.has-toggle .tw-readmore__toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* optional: make images/iframes responsive */
.tw-readmore img,
.tw-readmore iframe {
    max-width: 100%;
    height: auto;
}

/*********Read More elements END*************/