/**
 * PKH Partner Button — Shortcode [pkh_partner_button]
 * PKH Learn Now Button — Shortcode [pkh_learn_now_button]
 * Standalone stylesheet, loaded only on pages that use the shortcode.
 *
 * @package KhoaHocLMS
 */

/* ── Base ── */
.pkh-partner-btn,
.pkh-learn-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #1d71ab;
    color: #ffffff !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    border: none;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(29, 113, 171, 0.32), 0 1px 3px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}

/* ── Hover ── */
.pkh-partner-btn:hover,
.pkh-partner-btn:focus,
.pkh-learn-now-btn:hover,
.pkh-learn-now-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(29, 113, 171, 0.45), 0 2px 6px rgba(0, 0, 0, 0.14);
    filter: brightness(1.08);
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ── Active / press ── */
.pkh-partner-btn:active,
.pkh-learn-now-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(29, 113, 171, 0.3);
    filter: brightness(0.97);
}

/* ── Keyboard focus ring ── */
.pkh-partner-btn:focus-visible,
.pkh-learn-now-btn:focus-visible {
    outline: 3px solid rgba(29, 113, 171, 0.5);
    outline-offset: 3px;
}

/* ── Icon ── */
.pkh-partner-btn__icon,
.pkh-learn-now-btn__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2;
    transition: transform 0.18s ease;
}

.pkh-partner-btn:hover .pkh-partner-btn__icon,
.pkh-learn-now-btn:hover .pkh-learn-now-btn__icon {
    transform: scale(1.12);
}

/* ── Label ── */
.pkh-partner-btn__label,
.pkh-learn-now-btn__label {
    position: relative;
}

/* ── Size variants ── */
.pkh-partner-btn--sm,
.pkh-learn-now-btn--sm {
    padding: 7px 18px;
    font-size: 0.8125rem;
    gap: 6px;
}

.pkh-partner-btn--sm .pkh-partner-btn__icon,
.pkh-learn-now-btn--sm .pkh-learn-now-btn__icon {
    width: 15px;
    height: 15px;
}

.pkh-partner-btn--lg,
.pkh-learn-now-btn--lg {
    padding: 13px 32px;
    font-size: 1.0625rem;
    gap: 10px;
}

.pkh-partner-btn--lg .pkh-partner-btn__icon,
.pkh-learn-now-btn--lg .pkh-learn-now-btn__icon {
    width: 21px;
    height: 21px;
}

/* ──────────────────────────────────────────────────────────
   Header nav buttons (Flatsome theme)
   Target the two specific nav links by href so they always
   display with the #1d71ab brand colour regardless of which
   CSS class the theme assigns.
   ────────────────────────────────────────────────────────── */
a[href*="cong-tac-vien"],
a[href*="pkh-my-courses"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 7px 18px !important;
    min-width: 0 !important;
    width: auto !important;
    white-space: nowrap !important;
    background: #1d71ab !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #1d71ab !important;
    border-radius: 9999px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.01em !important;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(29, 113, 171, 0.32) !important;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease !important;
    overflow: visible !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
}

a[href*="cong-tac-vien"]:hover,
a[href*="cong-tac-vien"]:focus,
a[href*="pkh-my-courses"]:hover,
a[href*="pkh-my-courses"]:focus {
    background: #155e91 !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #155e91 !important;
    box-shadow: 0 8px 24px rgba(29, 113, 171, 0.4) !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

/* Responsive — tablet (≤ 960px) */
@media (max-width: 960px) {
    a[href*="cong-tac-vien"],
    a[href*="pkh-my-courses"] {
        padding: 6px 14px !important;
        font-size: 0.8125rem !important;
    }

    a[href*="pkh-my-courses"] img,
    a[href*="pkh-my-courses"] svg,
    a[href*="pkh-my-courses"] i,
    a[href*="pkh-my-courses"] .nav-icon,
    a[href*="pkh-my-courses"] .menu-icon {
        display: none !important;
    }
}

/* Responsive — mobile (≤ 600px) */
@media (max-width: 600px) {
    a[href*="cong-tac-vien"],
    a[href*="pkh-my-courses"] {
        padding: 5px 12px !important;
        font-size: 0.75rem !important;
        box-shadow: 0 2px 8px rgba(29, 113, 171, 0.25) !important;
    }

    a[href*="pkh-my-courses"] img,
    a[href*="pkh-my-courses"] svg,
    a[href*="pkh-my-courses"] i,
    a[href*="pkh-my-courses"] .nav-icon,
    a[href*="pkh-my-courses"] .menu-icon {
        display: none !important;
    }
}

/* Mobile: nút "Đối tác" — hiện trong flow trang, chia đều với nút Học ngay */
@media (max-width: 768px) {
    .pkh-partner-btn {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
        display: flex !important;
        width: 100% !important;
        flex: 1 !important;
        justify-content: center !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        padding: 14px 16px !important;
        border-radius: 10px !important;
        background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
        box-shadow: 0 4px 14px rgba(249, 115, 22, 0.32) !important;
    }
    .pkh-partner-btn:hover,
    .pkh-partner-btn:focus {
        background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
        filter: none !important;
        transform: translateY(-1px) !important;
    }
}
