/* =============================================
   Tech Press Ads – Social Share + Like + Pinterest + Email
   ============================================= */

/* ══════════════════════════════════════════
   SIDEBAR SOCIAL BAR
   ══════════════════════════════════════════ */
.tpa-social-bar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tpa-social-bar.pos-left  { left: 0; }
.tpa-social-bar.pos-right { right: 0; }

/* Sidebar like button */
.tpa-sidebar-like {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #fff;
    border: none;
    cursor: pointer;
    border-radius: 0 10px 10px 0;
    padding: 8px 10px;
    box-shadow: 2px 2px 12px rgba(0,0,0,.15);
    transition: transform .2s;
    width: 46px;
    box-sizing: border-box;
}
.tpa-social-bar.pos-right .tpa-sidebar-like {
    border-radius: 10px 0 0 10px;
}
.tpa-sidebar-like:hover { transform: scale(1.08); }
.tpa-like-heart { display: flex; align-items: center; justify-content: center; }
.tpa-sidebar-like-count {
    font-size: 10px;
    font-weight: 800;
    border-radius: 10px;
    padding: 1px 5px;
    min-width: 18px;
    text-align: center;
    line-height: 1.6;
    display: block;
}

/* Mobile toggle */
.tpa-social-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 0 10px 10px 0;
    box-shadow: 2px 2px 12px rgba(0,0,0,.18);
    padding: 0;
}
.tpa-social-bar.pos-right .tpa-social-toggle {
    border-radius: 10px 0 0 10px;
}

/* Share buttons */
.tpa-social-btns {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.tpa-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 0 10px 10px 0;
    border: none;
    cursor: pointer;
    transition: transform .2s, opacity .2s;
    text-decoration: none;
    box-shadow: 2px 2px 10px rgba(0,0,0,.15);
    padding: 0;
    box-sizing: border-box;
}
.tpa-social-bar.pos-right .tpa-social-btn {
    border-radius: 10px 0 0 10px;
}
.tpa-social-btn:hover { transform: scale(1.1); opacity: .9; }
.tpa-social-btn svg   { display: block; }

/* Brand colors */
.tpa-btn-whatsapp  { background: #25D366; color: #fff; }
.tpa-btn-telegram  { background: #0088CC; color: #fff; }
.tpa-btn-facebook  { background: #1877F2; color: #fff; }
.tpa-btn-pinterest { background: #E60023; color: #fff; }
.tpa-btn-instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.tpa-btn-copy      { background: #555;    color: #fff; }
.tpa-btn-copy.copied { background: #27ae60; }

/* Mobile: toggle hides/shows buttons */
@media (max-width: 768px) {
    .tpa-social-toggle { display: flex; }
    .tpa-social-btns {
        overflow: hidden;
        max-height: 0;
        transition: max-height .35s ease;
        gap: 5px;
    }
    .tpa-social-btns.open { max-height: 500px; }
}

/* ══════════════════════════════════════════
   LIKE BUTTON — IMAGE CORNER
   Position: BOTTOM-RIGHT of the image wrap
   ══════════════════════════════════════════ */
.tpa-img-like-wrap {
    position: absolute;
    bottom: 10px;       /* bottom-right corner */
    right: 10px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    pointer-events: auto;
}
.tpa-img-like-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    transition: transform .2s;
    padding: 0;
    line-height: 1;
}
.tpa-img-like-btn:hover { transform: scale(1.15); }
.tpa-img-like-btn svg   { display: block; }
.tpa-img-like-count {
    font-size: 10px;
    font-weight: 800;
    border-radius: 10px;
    padding: 1px 6px;
    min-width: 20px;
    text-align: center;
    line-height: 1.6;
    display: block;
}

/* ══════════════════════════════════════════
   PINTEREST SAVE BUTTON
   Top-left corner of image parent
   ══════════════════════════════════════════ */
.tpa-pin-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #E60023;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    padding: 6px 11px 6px 8px;
    font-size: 12px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    z-index: 30;                 /* above image, below overlay */
    opacity: 0;
    pointer-events: none;        /* invisible = not clickable */
    transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease;
    white-space: nowrap;
    line-height: 1;
    cursor: pointer;
    border: none;
}
.tpa-pin-btn.visible {
    opacity: 1;
    pointer-events: auto;        /* only clickable when visible */
    transform: translateY(0);
}
.tpa-pin-btn:hover { background: #c0001d; color: #fff; text-decoration: none; }
.tpa-pin-btn svg   { display: block; flex-shrink: 0; }

/* ══════════════════════════════════════════
   EMAIL FORM (inline shortcode)
   ══════════════════════════════════════════ */
.tpa-email-form-wrap {
    border-radius: 16px;
    padding: 28px 32px 24px;
    max-width: 680px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}
.tpa-ef-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}
.tpa-ef-text { flex: 1; }
.tpa-ef-text h3 { font-size: 22px; font-weight: 800; margin: 0 0 10px; line-height: 1.3; }
.tpa-ef-text p  { font-size: 14px; margin: 0; opacity: .9; line-height: 1.55; }
.tpa-ef-icon    { opacity: .85; flex-shrink: 0; }
.tpa-ef-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tpa-ef-input {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 14px;
    color: #333;
    background: rgba(255,255,255,.92);
    outline: none;
    box-sizing: border-box;
}
.tpa-ef-input::placeholder { color: #aaa; }
.tpa-ef-btn {
    border-radius: 8px;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s;
    background: transparent;
}
.tpa-ef-btn:hover   { opacity: .85; }
.tpa-ef-btn:disabled{ opacity: .6; cursor: wait; }

/* Popup overlay (built inline via JS for reliability) */
@media (max-width: 600px) {
    .tpa-email-form-wrap { padding: 20px 18px 18px; }
    .tpa-ef-content { flex-direction: column; align-items: flex-start; }
    .tpa-ef-icon { display: none; }
    .tpa-ef-text h3 { font-size: 18px; }
}

/* ══════════════════════════════════════════
   ADMIN – settings layout helpers
   ══════════════════════════════════════════ */
.tpa-range-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tpa-range-row input[type="range"] {
    flex: 1;
    accent-color: #ff6a00;
}
.tpa-range-val {
    font-size: 12px;
    color: #555;
    font-weight: 700;
    min-width: 40px;
    text-align: right;
}

/* ══════════════════════════════════════════
   DISCOUNT POPUP — Responsive
   ══════════════════════════════════════════ */
.tpa-discount-popup {
    text-align: center;
    max-width: 520px;
    width: 100%;
    box-sizing: border-box;
}
/* Stacked layout on mobile: input on top, button below */
.tpa-ef-row-stack {
    flex-direction: row;
    gap: 10px;
}
.tpa-ef-row-stack .tpa-ef-input {
    flex: 1;
    min-width: 0;
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 14px;
    box-sizing: border-box;
}
.tpa-ef-row-stack .tpa-ef-btn {
    flex-shrink: 0;
    border-radius: 8px;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .2s;
    border: none;
}
.tpa-ef-row-stack .tpa-ef-btn:hover { opacity: .88; }

/* Mobile: full width stack */
@media (max-width: 560px) {
    .tpa-discount-popup {
        padding: 24px 20px 22px !important;
        border-radius: 12px !important;
    }
    .tpa-ef-row-stack {
        flex-direction: column;
        gap: 10px;
    }
    .tpa-ef-row-stack .tpa-ef-input,
    .tpa-ef-row-stack .tpa-ef-btn {
        width: 100% !important;
        box-sizing: border-box;
    }
    .tpa-ef-row-stack .tpa-ef-btn {
        padding: 14px 22px;
        font-size: 16px;
        border-radius: 50px !important;
    }
}

/* Popup overlay responsive */
@media (max-width: 560px) {
    .tpa-popup-box {
        max-width: calc(100vw - 32px) !important;
    }
}
