@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Vazirmatn:wght@400;500;700;800&display=swap');

@font-face {
    font-family: spfont;
    src: url(font.woff);
}

#sp,
#sp * {
    box-sizing: border-box;
}

#sp {
    --primary: #6611DD;
    --primary-soft: rgba(102, 17, 221, 0.08);
    --primary-border: rgba(102, 17, 221, 0.22);
    --primary-shadow: rgba(102, 17, 221, 0.18);
    --surface: #FFFFFF;
    --surface-soft: #F6F8FC;
    --surface-strong: #EEF2FF;
    --text-main: #101828;
    --text-muted: #667085;
    --border: #E4E7EC;
    --danger-bg: #FFF4F2;
    --danger-text: #B42318;
    direction: rtl;
    margin: 32px 0;
    color: var(--text-main);
    font-family: 'Vazirmatn', 'Plus Jakarta Sans', spfont, sans-serif;
}

.woocommerce-order-details > #sp {
    margin: 40px 0;
}

#sp a {
    text-decoration: none;
}

#sp h1,
#sp h2,
#sp h3,
#sp h4,
#sp b,
#sp strong {
    margin: 0;
    font-family: 'Vazirmatn', 'Plus Jakarta Sans', spfont, sans-serif;
}

#sp p,
#sp small,
#sp span,
#sp textarea,
#sp button,
#sp a {
    font-family: inherit;
}

#sp h1 {
    font-size: 32px;
    line-height: 1.35;
    font-weight: 800;
}

#sp h2 {
    font-size: 22px;
    line-height: 1.4;
    font-weight: 800;
}

#sp h3 {
    font-size: 17px;
    line-height: 1.5;
    font-weight: 800;
}

#sp h4 {
    font-size: 15px;
    line-height: 1.6;
    font-weight: 700;
}

#sp p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.95;
}

#sp ul {
    list-style: none;
    margin: 0;
    padding: 0 !important;
}

#sp-toast {
    position: sticky;
    top: 18px;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    margin: 0 auto 12px;
    width: fit-content;
    max-width: calc(100% - 24px);
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(16, 24, 40, 0.92);
    color: #FFF;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.18);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

#sp-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.sp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, var(--primary-soft), transparent 36%),
        linear-gradient(135deg, #FFFFFF 0%, #FAFBFF 100%);
    box-shadow: 0 22px 54px rgba(16, 24, 40, 0.08);
}

.sp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 7px 12px;
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.sp-lead {
    max-width: 720px;
    margin-top: 14px !important;
    font-size: 15px !important;
}

.sp-hero__meta {
    display: grid;
    gap: 12px;
}

.sp-stat {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
}

.sp-stat span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.sp-stat strong {
    display: block;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.8;
    word-break: break-word;
}

#sp-warn {
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid #FED7D7;
    border-radius: 20px;
    background: var(--danger-bg);
    color: var(--danger-text);
    font-size: 14px;
    line-height: 1.95;
    font-weight: 700;
}

.sp-quick-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.sp-quick-guide__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.04);
}

.sp-quick-guide__item b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFF;
    font-size: 13px;
}

.sp-quick-guide__item span {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.9;
}

.sp-panel {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFF 100%);
    box-shadow: 0 18px 40px rgba(16, 24, 40, 0.05);
}

.sp-panel > h2 {
    display: inline-block;
    margin-bottom: 10px;
}

.sp-panel > p {
    margin-bottom: 18px;
}

.sp-card {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface-soft);
}

.sp-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-card h3 b {
    color: var(--primary);
}

.sp-section-note {
    margin-top: 10px !important;
    margin-bottom: 16px !important;
    font-size: 13px !important;
}

#spotplayer {
    overflow: hidden;
    width: 100%;
    height: 560px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(135deg, #F5F7FF 0%, #EEF2FF 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

#sp_players > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    padding: 2px;
}

#sp_players > div > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 162px;
    padding: 16px 12px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #FFF;
    color: inherit;
    text-align: center;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

#sp_players > div > a:hover {
    transform: translateY(-4px);
    border-color: var(--primary-border);
    box-shadow: 0 16px 28px var(--primary-shadow);
}

#sp_players > div > a.disable {
    opacity: 0.55;
    pointer-events: none;
}

#sp_players > div > a > img {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    object-fit: contain;
}

#sp_players > div > a > b {
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.8;
}

#sp_players > div > a > u {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

#sp_license textarea {
    direction: ltr;
    width: 100%;
    min-height: 110px;
    margin-top: 12px;
    padding: 16px;
    border: 1px dashed var(--primary-border);
    border-radius: 18px;
    background: #FFF;
    color: #1D2939;
    font-size: 12px;
    line-height: 1.9;
    outline: none;
    resize: vertical;
}

#sp_license button {
    width: 100%;
    margin-top: 12px;
    border: none;
    border-radius: 16px;
    background: var(--primary);
    color: #FFF;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 26px var(--primary-shadow);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

#sp_license button:hover {
    filter: brightness(0.94);
    transform: translateY(-1px);
}

#sp_license button:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px var(--primary-shadow);
}

#sp_videos > p {
    margin-bottom: 14px;
}

#sp_videos img {
    width: 14px;
    margin-left: 6px;
    vertical-align: middle;
}

#sp_videos > ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#sp_videos > ul > li {
    overflow: hidden;
    max-height: 56px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #FFF;
    transition: max-height 0.28s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

#sp_videos > ul > li:hover,
#sp_videos > ul > li.active {
    border-color: var(--primary-border);
    box-shadow: 0 14px 30px rgba(16, 24, 40, 0.06);
}

#sp_videos > ul > li.active {
    max-height: 2000px;
    background: #FFF;
}

#sp_videos > ul > li > h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    cursor: pointer;
}

#sp_videos > ul > li > h4:hover {
    color: var(--primary);
}

#sp_videos > ul > li > h4 > img {
    transition: transform 0.22s ease;
}

#sp_videos > ul > li.active > h4 > img {
    transform: rotate(180deg);
}

#sp_videos > ul > li > ul {
    padding: 0 18px 16px !important;
}

#sp_videos > ul > li > ul > li {
    padding: 10px 0;
}

#sp_videos > ul > li > ul > li.sp_seg {
    margin-top: 8px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
}

#sp_videos > ul > li > ul > li.sp_seg > a {
    color: var(--text-muted);
    pointer-events: none;
    font-weight: 700;
}

#sp_videos > ul > li > ul > li.sp_seg > a > img {
    display: none !important;
}

#sp_videos > ul > li > ul > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    transition: transform 0.18s ease;
}

#sp_videos > ul > li > ul > li > a:hover {
    transform: translateX(-4px);
}

#sp_courses {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin: 26px 0;
}

#sp_courses > a {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFBFF 100%);
    color: inherit;
    box-shadow: 0 16px 34px rgba(16, 24, 40, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

#sp_courses > a:hover {
    transform: translateY(-6px);
    border-color: var(--primary-border);
    box-shadow: 0 22px 40px var(--primary-shadow);
}

#sp_courses > a > img {
    display: block;
    width: 100%;
    height: 185px;
    object-fit: cover;
}

#sp_courses > a > h2 {
    padding: 16px 18px 18px;
    font-size: 17px;
}

#sp_courses > #sp,
.sp-empty-shell {
    grid-column: 1 / -1;
    margin: 0;
}

.sp-empty-state {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 24px;
    border: 1px dashed var(--primary-border);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, var(--primary-soft), transparent 34%),
        linear-gradient(180deg, #FFFFFF 0%, #FAFBFF 100%);
}

.sp-empty-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: var(--primary);
    color: #FFF;
    font-size: 26px;
    font-weight: 800;
}

.sp-empty-state__body p {
    margin-top: 8px;
}

.sp-empty-state__body small {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.8;
}

.sp-empty-state__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    padding: 13px 18px;
    border-radius: 16px;
    background: var(--primary);
    color: #FFF;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 14px 26px var(--primary-shadow);
}

@media (max-width: 980px) {
    .sp-hero,
    .sp-quick-guide {
        grid-template-columns: 1fr;
    }

    .sp-empty-state {
        grid-template-columns: 1fr;
    }

    .sp-empty-state__action {
        width: 100%;
    }
}

@media (max-width: 768px) {
    #sp {
        margin: 20px 0;
    }

    .sp-hero,
    .sp-panel,
    .sp-card,
    .sp-empty-state {
        padding: 18px;
        border-radius: 22px;
    }

    #sp h1 {
        font-size: 26px;
    }

    #sp h2 {
        font-size: 19px;
    }

    #spotplayer {
        height: 410px;
    }

    #sp_players > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #sp_courses {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 520px) {
    #sp h1 {
        font-size: 23px;
    }

    #sp_players > div,
    #sp_courses {
        grid-template-columns: 1fr;
    }

    #spotplayer {
        height: 300px;
    }

    #sp_license textarea {
        min-height: 92px;
    }
}
