/**
 * MyIELTS.pk Premium Button Stylesheet
 * 
 * Standardized interactive button design matching the Course Page .premium-btn
 * Features pill capsule, interactive round badge, sliding SVG arrows, and 3D character roll.
 * 
 * @package MyIELTS
 * @version 1.0.0
 */

/* ═══════════════════════════════════════════
   PREMIUM BUTTON — Core Layout & Design
   ═══════════════════════════════════════════ */
.premium-btn {
    appearance: none;
    -webkit-appearance: none;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 6px 6px 6px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, color 0.4s ease, transform 0.2s ease;
    position: relative;
    overflow: visible;
    text-decoration: none !important;
    box-sizing: border-box;
    max-width: 100%;
    color: #ffffff !important;
    line-height: 1;
    vertical-align: middle;
}

.premium-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: #e60000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-decoration: none !important;
    color: #ffffff !important;
}

.premium-btn:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════════
   TEXT WRAPPER & 3D CHARACTER ROLL
   ═══════════════════════════════════════════ */
.premium-btn .text-wrapper {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1;
    perspective: 600px;
    transform-style: preserve-3d;
    font-family: 'Inter', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    white-space: nowrap;
}

.premium-btn .char-box {
    position: relative;
    display: inline-block;
    transform-style: preserve-3d;
    transition: transform 0.65s cubic-bezier(0.19, 1, 0.22, 1);
    transition-delay: var(--delay);
    transform-origin: center center -10px;
}

.premium-btn .front,
.premium-btn .back {
    display: inline-block;
    backface-visibility: hidden;
    transition: filter 0.65s cubic-bezier(0.19, 1, 0.22, 1),
                opacity 0.65s cubic-bezier(0.19, 1, 0.22, 1);
    transition-delay: var(--delay);
}

.premium-btn .front {
    transform: translateZ(0);
}

.premium-btn .back {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateX(-90deg) translateZ(10px) translateY(10px);
    opacity: 0;
    filter: blur(8px) drop-shadow(0 -15px 10px rgba(255,255,255,0.3));
}

.premium-btn:hover .char-box {
    transform: rotateX(90deg);
}

.premium-btn:hover .front {
    opacity: 0;
    filter: blur(8px) drop-shadow(0 15px 10px rgba(255,255,255,0.3));
}

.premium-btn:hover .back {
    opacity: 1;
    filter: blur(0px) drop-shadow(0 0 0 transparent);
}

/* ═══════════════════════════════════════════
   INTERACTIVE ICON CIRCLE & SLIDING SVGs
   ═══════════════════════════════════════════ */
.premium-btn .icon-circle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: #e60000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                background 0.4s ease,
                color 0.4s ease;
    flex-shrink: 0;
    color: #ffffff;
}

.premium-btn:hover .icon-circle {
    transform: scale(0.95);
    background: #ffffff;
    color: #0a0a0a;
}

.premium-btn .icon-circle svg {
    width: 16px;
    height: 16px;
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    stroke: currentColor;
    pointer-events: none;
}

.premium-btn .icon-circle .svg-original {
    transform: translateX(0);
}

.premium-btn .icon-circle .svg-clone {
    transform: translateX(-200%);
}

.premium-btn:hover .icon-circle .svg-original {
    transform: translateX(200%);
}

.premium-btn:hover .icon-circle .svg-clone {
    transform: translateX(0);
}

/* ═══════════════════════════════════════════
   COMPACT MODIFIER (FOR HEADER BARS)
   ═══════════════════════════════════════════ */
.premium-btn.--sm {
    padding: 4px 4px 4px 14px;
    gap: 8px;
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.premium-btn.--sm .text-wrapper,
.premium-btn.--sm .text-wrapper span,
.premium-btn.--sm .char-box,
.premium-btn.--sm .front,
.premium-btn.--sm .back {
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 600;
}

/* Neutralize legacy .realtest-header__bt-review span { font-size: 22px } from proqyz-quiz.css */
button.realtest-header__bt-review span,
.realtest-header__bt-review:not(.btn__report-question) span,
.realtest-header__bt-review.premium-btn span,
.realtest-header__bt-review.premium-btn.--sm span,
.realtest-header__btn-group .realtest-header__bt-review.premium-btn span,
.realtest-header__btn-group .realtest-header__bt-review.premium-btn.--sm span {
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.premium-btn.--sm .icon-circle {
    width: 22px;
    height: 22px;
    min-width: 22px;
}

.premium-btn.--sm .icon-circle svg {
    width: 12px;
    height: 12px;
}

/* ═══════════════════════════════════════════
   HIGH-CONTRAST CANCEL BUTTON THEME
   ═══════════════════════════════════════════ */
.premium-btn.--cancel {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #475569 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.premium-btn.--cancel .text-wrapper,
.premium-btn.--cancel .text-wrapper span,
.premium-btn.--cancel .char-box,
.premium-btn.--cancel .front,
.premium-btn.--cancel .back {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.premium-btn.--cancel .icon-circle {
    background: #0f172a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.premium-btn.--cancel:hover {
    background: #334155 !important;
    border-color: #64748b !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.premium-btn.--cancel:hover .icon-circle,
.premium-btn.--cancel .icon-circle:hover {
    background: #e60000 !important;
    color: #ffffff !important;
    border-color: #e60000 !important;
    transform: scale(0.95);
}

/* ═══════════════════════════════════════════
   SECONDARY BUTTON THEME (NEUTRAL / HOME)
   ═══════════════════════════════════════════ */
.premium-btn.--secondary {
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #475569 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
}

.premium-btn.--secondary .text-wrapper,
.premium-btn.--secondary .text-wrapper span,
.premium-btn.--secondary .char-box,
.premium-btn.--secondary .front,
.premium-btn.--secondary .back {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.premium-btn.--secondary .icon-circle {
    background: #0f172a !important;
    color: #ffffff !important;
}

.premium-btn.--secondary:hover {
    background: #334155 !important;
    border-color: #64748b !important;
    color: #ffffff !important;
}

.premium-btn.--secondary:hover .icon-circle {
    background: #0f172a !important;
    color: #ffffff !important;
    transform: scale(0.95);
}

/* ═══════════════════════════════════════════
   LOADING / REDIRECTING SPINNER THEME
   ═══════════════════════════════════════════ */
@keyframes ipeBtnSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.premium-btn.--loading {
    cursor: wait !important;
    pointer-events: auto;
}

.premium-btn.--loading .icon-circle svg {
    animation: ipeBtnSpin 1s linear infinite !important;
    transform-origin: center center !important;
}

.premium-btn.--loading:hover .icon-circle svg.svg-original,
.premium-btn.--loading:hover .icon-circle svg {
    transform: none;
    animation: ipeBtnSpin 1s linear infinite !important;
}

.modal-time-up__btn.premium-btn.--loading {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    line-height: 44px !important;
    width: auto !important;
    padding: 0 14px 0 24px !important;
    box-sizing: border-box !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.modal-time-up__btn.premium-btn.--loading span,
.modal-time-up__btn.premium-btn.--loading .text-wrapper,
.modal-time-up__btn.premium-btn.--loading .text-wrapper span,
.modal-time-up__btn.premium-btn.--loading .char-box,
.modal-time-up__btn.premium-btn.--loading .front,
.modal-time-up__btn.premium-btn.--loading .back {
    font-size: 14px !important;
    line-height: 1.2 !important;
}

.modal-time-up__btn.premium-btn.--loading .icon-circle {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
}

/* ═══════════════════════════════════════════
   MODAL CONFIRMATION BUTTONS LAYOUT
   ═══════════════════════════════════════════ */
.modal-submit-test__footer,
.modal-submit-essay_btn-wrap {
    display: flex !important;
    gap: 16px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.modal-submit-test__footer .premium-btn,
.modal-submit-essay_btn-wrap .premium-btn {
    min-width: 160px;
    height: auto !important;
    justify-content: space-between !important;
}

.modal-submit-test__footer .premium-btn .icon-circle,
.modal-submit-essay_btn-wrap .premium-btn .icon-circle {
    margin-left: auto !important;
}

@media (max-width: 480px) {
    .modal-submit-test__footer .premium-btn,
    .modal-submit-essay_btn-wrap .premium-btn {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* ═══════════════════════════════════════════
   RESULTS & REVIEW PAGES SPECIFIC OVERRIDES
   ═══════════════════════════════════════════ */
.btn-show-re.premium-btn,
button.ielts-lms-result-show-button.premium-btn,
.ielts-lms-result-show-button.premium-btn {
    width: auto !important;
    min-width: 200px;
    height: auto !important;
    padding: 8px 8px 8px 22px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 999px !important;
    margin-right: 14px !important;
    margin-bottom: 14px !important;
    text-align: left !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}

.btn-show-re.premium-btn:hover,
button.ielts-lms-result-show-button.premium-btn:hover,
.ielts-lms-result-show-button.premium-btn:hover {
    background-color: #e60000 !important;
    color: #ffffff !important;
}

.reviews-test-mobile .btn-show-re.premium-btn {
    display: inline-flex !important;
}

/* ═══════════════════════════════════════════
   UNIVERSAL HEADER BUTTONS GEOMETRY & FONT LOCK
   (Review, Close, Home, Retake)
   ═══════════════════════════════════════════ */
.realtest-header__btn-group .premium-btn.--sm,
.realtest-header .premium-btn.--sm,
.realtest-header__btn-group .realtest-header__bt-submit.premium-btn.--sm,
.realtest-header__btn-group .realtest-header__bt-review.premium-btn.--sm {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    line-height: 32px !important;
    width: auto !important;
    padding: 0 10px 0 14px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-left: 6px !important;
    background: #0a0a0a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
    font-size: 12px !important;
}

.realtest-header__btn-group .premium-btn.--sm:hover,
.realtest-header .premium-btn.--sm:hover,
.realtest-header__btn-group .realtest-header__bt-submit.premium-btn.--sm:hover,
.realtest-header__btn-group .realtest-header__bt-review.premium-btn.--sm:hover {
    background: #e60000 !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

.realtest-header__btn-group .premium-btn.--sm span,
.realtest-header__btn-group .premium-btn.--sm .text-wrapper,
.realtest-header__btn-group .premium-btn.--sm .text-wrapper span,
.realtest-header__btn-group .premium-btn.--sm .char-box,
.realtest-header__btn-group .premium-btn.--sm .front,
.realtest-header__btn-group .premium-btn.--sm .back,
.realtest-header .premium-btn.--sm span,
.realtest-header .premium-btn.--sm .text-wrapper,
.realtest-header .premium-btn.--sm .text-wrapper span,
.realtest-header .premium-btn.--sm .char-box,
.realtest-header .premium-btn.--sm .front,
.realtest-header .premium-btn.--sm .back {
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.realtest-header__btn-group .premium-btn:after,
.realtest-header__btn-group .premium-btn:before,
.realtest-header .premium-btn:after,
.realtest-header .premium-btn:before,
.realtest-header__bt-submit.premium-btn:after,
.realtest-header__bt-submit.premium-btn:before,
.realtest-header__bt-review.premium-btn:after,
.realtest-header__bt-review.premium-btn:before {
    display: none !important;
    content: "" !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .btn-show-re.premium-btn,
    button.ielts-lms-result-show-button.premium-btn {
        width: 100% !important;
        margin-right: 0 !important;
        justify-content: space-between !important;
    }
}
