/* ==========================================================================
   MIVB Share Tray — shared component (builder + orders page)
   ========================================================================== */

#mivb-share-tray {
    display: none;
}

.mivb-share-tray-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.mivb-share-tray--visible .mivb-share-tray-backdrop {
    opacity: 1;
}

/* Card — centered modal on all screen sizes */
.mivb-share-tray-card {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -45%) scale(0.96);
    width: calc(100% - 32px);
    max-width: 480px;
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 28px;
    z-index: 99999;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.22s ease;
}

.mivb-share-tray--visible .mivb-share-tray-card {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Close button */
.mivb-share-tray-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}

.mivb-share-tray-close:hover {
    background: #e2e8f0;
    color: #111;
}

/* Icon section */
.mivb-share-tray-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.mivb-share-tray-icon {
    position: relative;
    width: 60px;
    height: 60px;
    background: #fce7f3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #db2777;
}

.mivb-share-tray-heart {
    position: absolute;
    bottom: 2px;
    right: 2px;
    line-height: 1;
}

/* Title */
.mivb-share-tray-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    text-align: center;
    line-height: 1.25;
}

/* Subtitle */
.mivb-share-tray-subtitle {
    margin: 0 0 20px;
    font-size: 14px;
    color: #64748b;
    line-height: 1.55;
    text-align: center;
}

.mivb-share-date-highlight {
    color: #e11d48;
    font-weight: 700;
}

/* URL section */
.mivb-share-url-section {
    margin-bottom: 10px;
}

.mivb-share-url-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
    display: inline;
    margin-right: 6px;
}

.mivb-share-url-row {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}

.mivb-share-url-icon {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #94a3b8;
    flex-shrink: 0;
}

.mivb-share-url-input {
    flex: 1;
    padding: 11px 4px 11px 0;
    border: none;
    font-size: 13px;
    color: #475569;
    background: transparent;
    outline: none;
    min-width: 0;
    font-family: inherit;
    border:none !important;
}

.mivb-share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding:16px 14px;
    background: #FF7396;
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    font-family: inherit;
    flex-shrink: 0;
    border-radius: 0 8px 8px 0;
}

.mivb-share-copy-btn:hover { background: #FF7396; }
.mivb-share-copy-btn.copied { background: #FF7396; }

/* Expiry line */
.mivb-share-expiry {
    display: inline;
    margin: 0 0 16px;
    font-size: 11px;
    color: #64748b;
}

.mivb-share-url-label-row {
    display: block;
    margin-bottom: 8px;
}

@keyframes mivb-cta-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-4px) rotate(-1deg); }
    40%       { transform: translateX(4px) rotate(1deg); }
    60%       { transform: translateX(-3px); }
    80%       { transform: translateX(3px); }
}

/* Download CTA row */
.mivb-share-download-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 14px;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    font-family: inherit;
    text-align: left;
    animation: mivb-cta-shake 0.6s ease 1.2s 1;
}

.mivb-share-download-cta:hover {
    background: #f0fdf4;
    border-color: #16a34a;
    transform: translateY(-1px);
}

.mivb-share-download-cta-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mivb-share-download-cta-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mivb-share-download-cta-title {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
}

.mivb-share-download-cta-sub {
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
    line-height: 1.3;
}

.mivb-share-download-cta-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #94a3b8;
}

/* Bottom notice */
.mivb-share-tray-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0fdf4;
    border-radius: 12px;
    padding: 12px 14px;
}

.mivb-share-notice-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}

.mivb-share-notice-shield {
    flex-shrink: 0;
    color: #16a34a;
    margin-top: 1px;
    display: flex;
    align-items: center;
}

.mivb-share-notice-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mivb-share-notice-heading {
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
    line-height: 1.3;
}

.mivb-share-notice-desc {
    font-size: 11px;
    color: #166534;
    line-height: 1.45;
    font-weight: 400;
}

.mivb-share-notice-art {
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.mivb-notice-sparkle {
    position: absolute;
    top: -4px;
    right: -4px;
}

/* Orders page already has its own download — hide the CTA from the share tray */
body.woocommerce-orders .mivb-share-download-cta {
    display: none !important;
}
