/* ==========================================================================
   VHieu Web Translator – Share Modal & Extra UI Styles
   Version: 1.1.0
   ========================================================================== */

/* ---- Share Overlay Backdrop ---- */
.vwt-share-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    z-index: 9999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    animation: vwt-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vwt-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vwt-share-overlay.vwt-hidden {
    display: none !important;
}

/* ---- Share Modal Card ---- */
.vwt-share-modal {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    width: 100%;
    max-width: 540px;
    overflow: hidden;
    animation: vwt-modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

@keyframes vwt-modal-pop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header */
.vwt-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vwt-share-header h4 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vwt-share-close {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vwt-share-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.08);
}

/* Modal Body */
.vwt-share-body {
    padding: 24px;
    color: #334155;
}

/* Loading State */
.vwt-share-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
}

.vwt-spinner-sm {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: vwt-spin 0.8s linear infinite;
    flex-shrink: 0;
}

/* Description text */
.vwt-share-desc {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Saved State Preview Card */
.vwt-share-state-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vwt-share-info-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
}

.vwt-share-info-icon {
    flex-shrink: 0;
    font-size: 15px;
}

.vwt-share-info-label {
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.vwt-share-info-url,
.vwt-share-info-lang,
.vwt-share-info-height,
.vwt-share-info-fsmode {
    color: #0f172a;
    font-weight: 600;
    word-break: break-all;
}

.vwt-share-info-url {
    color: #2563eb;
}

/* Share URL Copy Box */
.vwt-share-link-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.vwt-share-link-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 8px 12px !important;
    font-size: 13.5px !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    outline: none !important;
    box-shadow: none !important;
    min-width: 0;
    cursor: text;
}

.vwt-share-copy-btn {
    padding: 9px 18px;
    background: #2563eb;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.vwt-share-copy-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.vwt-share-copy-btn:active {
    transform: translateY(1px);
}

/* Social Share Buttons */
.vwt-share-socials {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.vwt-share-socials-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
}

.vwt-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 12.5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.vwt-social-fb { color: #1877f2; }
.vwt-social-tw { color: #000000; }
.vwt-social-wa { color: #16a34a; }

.vwt-social-fb:hover {
    background: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
    transform: translateY(-1px);
}

.vwt-social-tw:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
    transform: translateY(-1px);
}

.vwt-social-wa:hover {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
    transform: translateY(-1px);
}

/* Expiry text */
.vwt-share-expiry {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Error State */
.vwt-share-error {
    text-align: center;
    padding: 24px 0;
}

.vwt-share-error p {
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
}

.vwt-share-retry {
    padding: 8px 20px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vwt-share-retry:hover {
    background: #1d4ed8;
}

/* Responsive */
@media (max-width: 576px) {
    .vwt-share-modal {
        border-radius: 16px;
    }
    .vwt-share-link-wrap {
        flex-direction: column;
    }
    .vwt-share-copy-btn {
        width: 100%;
        justify-content: center;
    }
}
