/* Stage 11 corrective conformance layer.
 * Every selector in this file closes a verified DESIGN.md -> active runtime
 * mismatch. It must not redefine Wallet artwork/finance gradients, attendance
 * visuals, or the frozen course-signup choreography.
 */

/* ==================== BOTTOM SHEET SHELL ==================== */

#bottom_sheet_activity_detail {
    background: var(--ui-surface, #ffffff) !important;
}

/* ==================== HOME ==================== */

.p-home-calendar-shift {
    top: 14px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
}

.p-home-calendar-shift.is-prev { left: -30px !important; }
.p-home-calendar-shift.is-next { right: -30px !important; }

/* ==================== ZAJĘCIA ==================== */

#panel-courses a[href*="schedule.php"] {
    min-height: 48px !important;
    border: 1px solid var(--ui-line, #ececec) !important;
    border-radius: var(--radius-control, 12px) !important;
    background: var(--ui-surface, #ffffff) !important;
    color: var(--ui-text, #333333) !important;
    box-shadow: none !important;
    font-size: var(--type-button-size, 14px) !important;
    font-weight: var(--type-button-weight, 700) !important;
    line-height: var(--type-button-line-height, 1.2) !important;
    text-decoration: none !important;
}

#panel-courses a[href*="schedule.php"] > i { display: none !important; }

.list-course-state,
.list-course-type-badge {
    border: 0 !important;
    border-radius: var(--radius-pill, 999px) !important;
    background: var(--ui-status-quiet-bg, #f2f0ed) !important;
    color: var(--ui-status-quiet-text, #57534e) !important;
    box-shadow: none !important;
    font-size: var(--type-micro-status-size, 10px) !important;
    font-weight: var(--type-micro-status-weight, 700) !important;
    line-height: var(--type-micro-status-line-height, 1.2) !important;
}

#makeups-list button[onclick*="retryMakeups"] {
    min-height: 48px !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: var(--radius-control, 12px) !important;
    background: var(--ui-brand-action, #d7181c) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-size: var(--type-button-size, 14px) !important;
    font-weight: var(--type-button-weight, 700) !important;
    line-height: var(--type-button-line-height, 1.2) !important;
}

#makeups-list button[onclick*="loadMoreMakeups"] {
    min-height: 40px;
    border: 0 !important;
    background: transparent !important;
    color: var(--ui-text-secondary, #636363) !important;
    font-size: var(--type-filter-size, 12px) !important;
    font-weight: var(--type-filter-weight, 600) !important;
    line-height: var(--type-filter-line-height, 1.2) !important;
}

.makeups-rate-count {
    font-size: var(--type-micro-status-size, 10px) !important;
    font-weight: var(--type-micro-status-weight, 700) !important;
    line-height: var(--type-micro-status-line-height, 1.2) !important;
}

.makeup-rating-cta {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: var(--type-micro-status-size, 10px) !important;
    font-weight: var(--type-micro-status-weight, 700) !important;
    line-height: var(--type-micro-status-line-height, 1.2) !important;
}

.makeup-rating-bubble > span {
    font-size: var(--type-activity-value-size, 13px) !important;
    font-weight: var(--type-activity-value-weight, 800) !important;
    line-height: var(--type-activity-value-line-height, 1.2) !important;
}

/* ==================== GRAFIK / ACTIVITY DETAIL ==================== */

#filter-sheet button[onclick="clearFilters()"] {
    min-height: 40px;
    border: 0 !important;
    background: transparent !important;
    color: var(--ui-text-secondary, #636363) !important;
    box-shadow: none !important;
    font-size: var(--type-filter-size, 12px) !important;
    font-weight: var(--type-filter-weight, 600) !important;
    line-height: var(--type-filter-line-height, 1.2) !important;
}

/* Back/close in enrollment header obey left=back and canonical X positioning. */
.p-schedule-activity-detail-form-header {
    position: relative !important;
    grid-template-columns: 44px 1fr 44px !important;
    padding-right: 16px !important;
}

#bottom_sheet_activity_detail_form_back svg {
    transform: rotate(-90deg);
    transform-origin: center;
}

.p-schedule-signup-notice {
    transition:
        max-height 420ms var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        padding 420ms var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        border-width 420ms var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        opacity 260ms var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        transform 420ms var(--motion-ease, cubic-bezier(.2,.8,.2,1)) !important;
}

.p-schedule-pricing-block {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.p-schedule-pricing-block h3 {
    color: var(--ui-text, #333333) !important;
    font-size: var(--type-form-size, 14px) !important;
    font-weight: var(--type-form-weight, 600) !important;
    line-height: var(--type-form-line-height, 1.35) !important;
    letter-spacing: 0 !important;
}

.p-schedule-pricing-row:not(.p-schedule-pricing-head) span:nth-child(n+2) { color: var(--ui-text, #333333) !important; }
.p-schedule-pricing-head,
.p-schedule-pricing-note,
.p-schedule-pricing-method { color: var(--ui-text-secondary, #636363) !important; }

/* ==================== NOTIFICATIONS ==================== */

#notifications-sheet .bottom-sheet-content { background: var(--ui-surface, #ffffff) !important; }
#notifications-sheet .text-slate-400,
#notifications-sheet .text-slate-300 { color: var(--color-text-subtle, #707070) !important; }
#notifications-sheet .text-indigo-600,
#notifications-sheet .text-indigo-500 { color: var(--ui-brand-action, #d7181c) !important; }
#notifications-sheet .bg-indigo-50,
#notifications-sheet .bg-indigo-100 { background: transparent !important; }
#notifications-sheet .notif-unread,
#notifications-sheet .notif-read { background: var(--ui-surface, #ffffff) !important; }
#notifications-sheet .unread-dot { background: var(--ui-brand-action, #d7181c) !important; }

#notifications-sheet .notif-item > div:first-child:has(> i) {
    border-color: transparent !important;
    background: var(--ui-status-quiet-bg, #f2f0ed) !important;
    color: var(--ui-status-quiet-text, #57534e) !important;
}

#notifications-sheet .chip {
    min-height: 34px;
    border: 1px solid var(--ui-line, #ececec) !important;
    border-radius: var(--radius-pill, 999px) !important;
    background: var(--ui-surface, #ffffff) !important;
    color: var(--ui-text-secondary, #636363) !important;
    box-shadow: none !important;
    font-size: var(--type-filter-size, 12px) !important;
    font-weight: var(--type-filter-weight, 600) !important;
    line-height: var(--type-filter-line-height, 1.2) !important;
    transition:
        background-color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        border-color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)) !important;
}

#notifications-sheet .chip-active {
    border-color: rgba(37, 133, 104, .22) !important;
    background: var(--ui-selected-soft, #eaf6f2) !important;
    color: var(--ui-selected-dark, #1f765e) !important;
}

#notifications-sheet .chip span.text-\[9px\] { font-size: var(--type-micro-status-size, 10px) !important; }

#notifications-sheet #mark-all-read-btn {
    min-height: 40px;
    border: 0 !important;
    background: transparent !important;
    color: var(--ui-brand-action, #d7181c) !important;
    box-shadow: none !important;
    font-size: var(--type-micro-status-size, 10px) !important;
    font-weight: var(--type-micro-status-weight, 700) !important;
}

#notifications-sheet .notif-title {
    color: var(--ui-text, #333333) !important;
    font-size: var(--type-body-size, 14px) !important;
    line-height: var(--type-body-line-height, 1.45) !important;
}

#notifications-sheet .notif-item p {
    font-size: var(--type-body-size, 14px) !important;
    line-height: var(--type-body-line-height, 1.45) !important;
}

#notifications-sheet .notif-item {
    transition:
        transform var(--motion-small, 240ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        background-color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)) !important;
}

#notifications-sheet .animate-mark-read {
    animation: markReadFlash var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)) forwards !important;
}

/* ==================== ACTIVE COURSE DETAILS ROUTE ==================== */

.activity-details-page #activity-details-title {
    color: var(--ui-text, #333333) !important;
    font-size: var(--type-page-title-size, 18px) !important;
    font-weight: var(--type-page-title-weight, 800) !important;
    line-height: var(--type-page-title-line-height, 1.2) !important;
}

.activity-details-page button[onclick="window.history.back()"],
.activity-details-page button[onclick="toggleMenu()"] {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border: 0 !important;
    border-radius: var(--radius-control, 12px) !important;
    background: transparent !important;
    color: var(--ui-text-secondary, #636363) !important;
    box-shadow: none !important;
}

.activity-details-page button[onclick="window.history.back()"]:focus-visible,
.activity-details-page button[onclick="toggleMenu()"]:focus-visible {
    outline: 2px solid #737373 !important;
    outline-offset: 2px !important;
}

.activity-details-page button[onclick="window.history.back()"] > i { display: none !important; }

.activity-details-page button[onclick="window.history.back()"]::before {
    content: '';
    width: 18px;
    height: 18px;
    display: block;
    background: currentColor;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E");
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.activity-details-page .details-anchor-nav {
    font-size: var(--type-micro-supporting-size, 10px) !important;
    font-weight: var(--type-micro-supporting-weight, 500) !important;
    line-height: var(--type-micro-supporting-line-height, 1.25) !important;
}

.activity-details-page .details-rating-cta {
    min-height: 48px !important;
    border: 0 !important;
    border-radius: var(--radius-control, 12px) !important;
    background: var(--ui-brand-action, #d7181c) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-size: var(--type-button-size, 14px) !important;
    font-weight: var(--type-button-weight, 700) !important;
    line-height: var(--type-button-line-height, 1.2) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    transition:
        background-color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        transform var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)) !important;
}

#section-stats .details-info-card {
    border: 0 !important;
    border-radius: var(--radius-card, 16px) !important;
    background: var(--ui-surface, #ffffff) !important;
    color: var(--ui-text, #333333) !important;
    box-shadow: var(--shadow-card) !important;
}

#section-stats .details-info-card > .absolute { display: none !important; }

#section-stats .details-info-card .grid > div {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

#section-stats .details-info-card .grid > div > span:first-child {
    color: var(--ui-text, #333333) !important;
    font-size: var(--type-activity-value-size, 13px) !important;
    font-weight: var(--type-activity-value-weight, 800) !important;
    line-height: var(--type-activity-value-line-height, 1.2) !important;
}

#section-stats .details-info-card .grid > div > span:last-child {
    color: var(--ui-text-secondary, #636363) !important;
    font-size: var(--type-micro-supporting-size, 10px) !important;
    font-weight: var(--type-micro-supporting-weight, 500) !important;
    line-height: var(--type-micro-supporting-line-height, 1.25) !important;
    letter-spacing: 0 !important;
}

.activity-details-page .bottom-sheet-meet-rating-tag-btn {
    border-radius: var(--radius-small, 8px) !important;
    transition:
        background-color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        border-color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)) !important;
}

.activity-details-page .bottom-sheet-meet-rating-stars i {
    transition:
        color var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)),
        transform var(--motion-micro, 160ms) var(--motion-ease, cubic-bezier(.2,.8,.2,1)) !important;
}

/* ==================== WALLET / PAYNOW ==================== */

.p-mypayments-paynow-cta {
    border: 0 !important;
    border-radius: var(--radius-card, 16px) !important;
    box-shadow: var(--shadow-card) !important;
}

.p-mypayments-paynow-label {
    color: var(--ui-text, #333333) !important;
    font-size: var(--type-form-size, 14px) !important;
    font-weight: var(--type-form-weight, 600) !important;
    line-height: var(--type-form-line-height, 1.35) !important;
}

.p-mypayments-paynow-description,
.p-mypayments-paynow-cta-text {
    color: var(--ui-text-secondary, #636363) !important;
    font-size: var(--type-helper-size, 12px) !important;
    font-weight: var(--type-helper-weight, 500) !important;
    line-height: var(--type-helper-line-height, 1.4) !important;
}

/* ==================== PROFILE ==================== */

.profile-summary h1 { line-height: var(--type-page-title-line-height, 1.2) !important; }

.profile-field input:focus {
    border-color: var(--color-text-subtle, #707070) !important;
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.08) !important;
    outline: none !important;
}

@media (prefers-reduced-motion: reduce) {
    #notifications-sheet .chip,
    #notifications-sheet .notif-item,
    #notifications-sheet .animate-mark-read,
    .p-schedule-signup-notice,
    .activity-details-page .details-rating-cta,
    .activity-details-page .bottom-sheet-meet-rating-tag-btn,
    .activity-details-page .bottom-sheet-meet-rating-stars i {
        transition: none !important;
        animation-duration: 1ms !important;
    }
}
