/**
 * share.css — WebWeCreate Share
 *
 * @package WebWeCreate_Share
 * @version 1.1.0
 * @since   1.0.0
 *
 * Changelog:
 *   1.1.0 — รวม share button styles จาก portfolio.css เข้ามาที่นี่ที่เดียว
 *           ลบ animation: wwcSlideUp ออกจาก hover (สาเหตุปุ่มกระพริบ)
 *           ลบ dead code .wwcg-share ที่ซ้ำซ้อนจาก live CSS เวอร์ชันเก่า
 *   1.0.0 — Initial release
 *
 * Class index:
 *   Modal / Overlay     — #wwc-share-overlay, #wwc-share-modal
 *   Platform grid       — .wwc-share-grid, .wwc-share-platform, .wwc-icon-wrap
 *   Toast               — .wwc-toast
 *   Copied badge        — .wwc-copied-badge
 *   Portfolio btn       — .wwc-share-btn  (used in pf-work-card)
 *   Gallery circle btn  — .wwcg-share     (used in wwc_gallery shortcode)
 *   WooGallery inject   — .wcgs-share-bar, .wcgs-share-btn
 */

/* =============================================================================
   1. Modal Overlay
   ============================================================================= */

#wwc-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
    animation: wwcFadeIn .2s ease;
}

@keyframes wwcFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =============================================================================
   2. Modal Sheet
   ============================================================================= */

#wwc-share-modal {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0));
    animation: wwcSlideUp .25s ease;
}

@keyframes wwcSlideUp {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

#wwc-share-modal h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #111;
}

/* =============================================================================
   3. Platform Grid
   ============================================================================= */

.wwc-share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.wwc-share-platform {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.wwc-share-platform .wwc-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s;
}

.wwc-share-platform:hover  .wwc-icon-wrap,
.wwc-share-platform:active .wwc-icon-wrap {
    transform: scale(1.1);
}

.wwc-share-platform svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wwc-share-platform span {
    font-size: 11px;
    color: #555;
}

/* =============================================================================
   4. Close Button
   ============================================================================= */

#wwc-share-close {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    transition: background .15s;
}

#wwc-share-close:hover {
    background: #f3f4f6;
}

/* =============================================================================
   5. Copied Badge & Toast
   ============================================================================= */

.wwc-copied-badge {
    display: inline-block;
    background: #10b981;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
}

.wwc-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 999999;
    text-align: center;
    max-width: 280px;
    line-height: 1.4;
    animation: wwcFadeIn .2s ease;
}


/* Section 6 — Universal Share Button */
.wwc-share-btn {
    flex-shrink: 0;
    align-self: flex-start;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #aaa;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s ease;
}

.wwc-share-btn:hover {
    color: #000;
    background: transparent !important;
    transform: translateY(-3px);
}

/* =============================================================================
   7. Gallery Circle Share Button (.wwcg-share)
   ใช้ใน [wwc_gallery] shortcode ใน .wwcg-slide-info
   ============================================================================= */

/*.wwcg-share {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s, background 0.2s, transform 0.2s ease;
}

.wwcg-share:hover {
    background: transparent !important;
    transform: translateY(-3px);
}

.wwcg-share img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}


.wwcg-share:not(:has(img))::before,
.wwcg-share:empty::before {
    content: '';
    display: block;
    width: 25px;
    height: 25px;
    background-image: url("/wp-content/uploads/2026/04/upload.png");
    background-size: contain;
    background-repeat: no-repeat;
}*/

/* =============================================================================
   8. WooGallery Inject Share Button (.wcgs-share-btn)
   inject โดย wcgs-share-inject.js เข้าใน .wcgs-carousel
   ============================================================================= */

.wcgs-share-bar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 10px 0;
}

/*.wcgs-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.wcgs-share-btn:hover {
	background: transparent !important;
    transform: translateY(-3px);
}*/