/* ============================================================
   Test Desk (TD) — Share Modal + Share Button
   File Path : assets/css/share.css
   ============================================================ */

/* ------------------------------------------------------------
   Share Button (जो किसी page पर दिखेगा)
------------------------------------------------------------ */
.td-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    color: #0b5cab;
    background: #eef6fd;
    border: 1.5px solid #cbe3f6;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
}
.td-share-btn:hover {
    background: #d7ebfa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 80, 140, 0.10);
    color: #084a8a;
}

/* SVG icon के अंदर — size साफ़ रहे */
.td-share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

/* पुराना emoji-based icon (अगर कहीं बचा हो — छिप जाए) */
.td-share-btn .td-share-ico {
    font-size: 16px;
    line-height: 1;
    display: none;
}

.td-share-btn-block {
    display: flex;
    width: 100%;
}

/* ------------------------------------------------------------
   Small icon-only share button (जैसे card के दाईं ओर)
------------------------------------------------------------ */
.td-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #eef6fd;
    border: 1.5px solid #cbe3f6;
    color: #0b5cab;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    padding: 0;
}
.td-share-icon:hover {
    background: #d7ebfa;
    transform: translateY(-1px);
}

.td-share-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ------------------------------------------------------------
   Modal
------------------------------------------------------------ */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}
.share-modal.show {
    display: block;
}

.share-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 40, 70, 0.42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.share-modal.show .share-modal-overlay {
    opacity: 1;
}

.share-modal-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -46%) scale(0.98);
    width: calc(100% - 28px);
    max-width: 420px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.share-modal.show .share-modal-box {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.share-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f7;
    background: #f8fbfe;
}
.share-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #0b4a85;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.share-modal-title svg {
    width: 18px;
    height: 18px;
    display: block;
}

.share-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef6fd;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #33475f;
    transition: background 0.15s ease;
}
.share-modal-close:hover {
    background: #d7ebfa;
}

.share-modal-body {
    padding: 16px 18px 20px;
}

.share-modal-info {
    margin-bottom: 14px;
    text-align: center;
}
.share-modal-txt {
    font-size: 14.5px;
    font-weight: 600;
    color: #1a2b45;
    line-height: 1.4;
    word-wrap: break-word;
}

.share-modal-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.share-modal .share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    background: #33475f;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
    font-family: inherit;
    text-align: center;
}
.share-modal .share-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.share-modal .share-whatsapp { background: #25D366; }
.share-modal .share-telegram { background: #0088cc; }
.share-modal .share-facebook { background: #1877F2; }
.share-modal .share-x        { background: #000000; }
.share-modal .share-copy     { background: #5a7a95; }

.share-modal .share-ico { font-size: 15px; line-height: 1; }

.share-modal-url {
    font-size: 11.5px;
    color: #6a7c92;
    text-align: center;
    padding: 8px 12px;
    background: #f8fbfe;
    border-radius: 8px;
    word-break: break-all;
    font-family: "Courier New", monospace;
    line-height: 1.5;
}

@media (min-width: 600px) {
    .share-modal-btns {
        grid-template-columns: repeat(5, 1fr);
    }
    .share-modal .share-btn {
        flex-direction: column;
        padding: 12px 6px;
        font-size: 11.5px;
        gap: 4px;
    }
    .share-modal .share-btn .share-ico {
        font-size: 20px;
    }
}
