/* ==========================================================================
   Tutor LMS with the v7 accent.

   The orange comes from Tutor's own setting (Tutor > Settings > Design >
   brand colour #f25a1d), not from this file. Tutor 4 also has its own light
   and dark mode, so this file sets no Tutor colours: only the video player,
   which Tutor's setting doesn't reach, plus v7 widths, shapes and fonts.
   ========================================================================== */
html:root{
  /* Video player (Plyr) on lesson pages */
  --plyr-color-main:#F25A1D;
}

/* Width: course pages and the course list line up with the 1200px header.
   Tutor's container is 1320px with 12px padding; this makes its content box
   exactly min(100% - 32px, 1200px), the same as .wrap. The dashboard keeps its own layout. */
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-container{width:min(100% - 8px, calc(var(--wrap) + 24px));max-width:none;margin-inline:auto}

/* Lesson, quiz and assignment pages are a full-width app with 8px edges:
   the header capsule widens to the same edges there. */
body:has(.tutor-learning-area) .nav .wrap{width:calc(100% - 16px)}

/* Spacing under the sticky nav on course pages and the course list */
.ahv-tutor .tutor-wrap.tutor-page-wrap,.ahv-tutor .tutor-course-archive-page,.ahv-tutor .tutor-courses-wrap{padding-top:clamp(28px,4vw,48px);padding-bottom:clamp(56px,7vw,96px)}

/* Login card (the dashboard while logged out). Tutor sets an inline width:520px;max-width:100%,
   so on phones the card touched both screen edges: keep the header's 16px edges and the v7 card shape. */
.tutor-login-wrap{max-width:calc(100% - 32px) !important;margin:clamp(28px,6vw,70px) auto !important;border:1px solid var(--line);border-radius:24px !important;overflow:hidden}
@media (max-width:640px){
  .tutor-login-wrap{padding-top:4px !important;padding-bottom:24px !important}
  .tutor-login-wrap .tutor-login-form-wrapper{padding:24px 20px !important}
}

/* v7 type on course pages and the course list (the dashboard keeps Tutor's own type) */
.ahv-tutor .tutor-course-details-title,.ahv-tutor .tutor-course-name,.ahv-tutor .tutor-course-content-title{font-family:var(--font-d);font-weight:400}
.ahv-tutor .tutor-course-details-title{line-height:1.25}

/* Shapes */
.ahv-tutor .tutor-course-card,.ahv-tutor .tutor-sidebar-card,.ahv-tutor .tutor-course-details-widget,.ahv-tutor .tutor-accordion-item{border-radius:24px}
.ahv-tutor .tutor-course-card{overflow:hidden;transition:transform .35s cubic-bezier(.2,.7,.2,1),box-shadow .35s}
.ahv-tutor .tutor-course-card:hover{transform:translateY(-4px);box-shadow:0 30px 50px -30px rgba(0,0,0,.45)}
.ahv-tutor .tutor-accordion-item{overflow:hidden}
.ahv-tutor .tutor-btn{border-radius:999px}
.ahv-tutor .tutor-btn-primary,.ahv-tutor .tutor-add-to-cart-button{color:#fff}
.tutor-modal-content{border-radius:24px}

/* Course card spacing (course list). The loop template still uses Tutor's old spacing classes
   (tutor-mt-12, tutor-mb-20, tutor-mt-32), but Tutor 4's tutor-core.css maps them to a bigger
   scale (mt-12 = 56px, mb-20 = 120px), which left big gaps between rating, title, time and author.
   Even gaps instead; tutor-mt-auto keeps pushing things to the bottom. */
.ahv-tutor .tutor-course-card .tutor-card-body{gap:10px}
.ahv-tutor .tutor-course-card .tutor-card-body > :not(.tutor-mt-auto){margin-top:0;margin-bottom:0}
.ahv-tutor .tutor-course-card .tutor-course-name{line-height:1.35}
.ahv-tutor .tutor-course-card .tutor-card-body > .tutor-meta-course-by-cat{margin-top:6px}

/* Course list header below 1200px: "Courses", the sort menu and the filter button on one line.
   Tutor puts the heading and the sort menu in different boxes (plus a <br>), so those boxes are
   flattened into one grid. The filter panel is position:fixed there, so it stays out of the grid. */
@media (max-width:1199.98px){
  .ahv-tutor .course-archive-page{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;column-gap:10px}
  .ahv-tutor .course-archive-page > .tutor-d-xl-none,
  .ahv-tutor .course-archive-page > .tutor-d-xl-none > .tutor-d-flex,
  .ahv-tutor .course-archive-page > .tutor-row,
  .ahv-tutor .course-archive-page > .tutor-row > [class*="tutor-col-xl"],
  .ahv-tutor .course-archive-page > .tutor-row > [class*="tutor-col-xl"] > div:first-child{display:contents !important}
  .ahv-tutor .course-archive-page h1.tutor-fs-3{grid-column:1;grid-row:1;margin:0;font-family:var(--font-d);font-weight:400;font-size:28px;line-height:1.2}
  .ahv-tutor .course-archive-page [tutor-toggle-course-filter]{grid-column:3;grid-row:1}
  .ahv-tutor .course-archive-page .tutor-course-filter:has([name="course_order"]){grid-column:2;grid-row:1;justify-self:end;min-width:0;max-width:100%}
  .ahv-tutor .course-archive-page .tutor-course-filter:has([name="course_order"]) form{display:block !important;max-width:100%}
  .ahv-tutor .course-archive-page [tutor-course-filter] ~ br{display:none}
  .ahv-tutor .course-archive-page [tutor-course-list-container]{grid-column:1 / -1;grid-row:2;margin-top:24px}
}

/* Course cards (course list, categories, related courses) in the homepage card style (.cc):
   bone card with an inset rounded image, hours as a chip, v7 price and the black "go" pill.
   The dashboard keeps Tutor's own cards. */
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card{padding:14px;border:1px solid var(--line);border-radius:28px;background:var(--bone-hi);box-shadow:none}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card:hover{transform:translateY(-5px);box-shadow:0 30px 50px -30px rgba(22,17,17,.5)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-course-thumbnail{border-radius:18px;overflow:hidden;background:var(--bone-lo)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-image-top{border-radius:0;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card:hover .tutor-card-image-top{transform:scale(1.05)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-course-bookmark{top:24px;right:24px;z-index:2}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-course-bookmark .tutor-iconic-btn{background:var(--bone-hi);color:var(--charcoal)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-body{gap:12px;padding:18px 8px 6px;background:transparent}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-course-ratings:not(:has(*)){display:none}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-ratings-stars{color:var(--orange)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-ratings-average{color:var(--charcoal);font-weight:600}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-ratings-count{color:var(--ink-3)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-course-name{font-size:22px;line-height:1.28}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-course-name a{color:var(--charcoal)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-body > .tutor-meta:not(.tutor-mt-auto){flex-wrap:wrap;gap:6px}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-body > .tutor-meta:not(.tutor-mt-auto) > div{display:inline-flex;align-items:center;gap:6px;padding:3px 12px;border-radius:999px;background:rgba(22,17,17,.06);font-size:15px;line-height:1.7;color:var(--ink-2)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-body > .tutor-meta:not(.tutor-mt-auto) .tutor-meta-icon{font-size:15px;color:inherit;opacity:.8}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-meta.tutor-mt-auto{gap:10px;font-size:14.5px;color:var(--ink-3)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-meta.tutor-mt-auto a{color:var(--ink-2)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-bundle-course-count-badge{margin:0;padding:3px 12px;background:var(--charcoal);color:var(--bone-hi);font-size:13.5px;line-height:1.7}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-bundle-discount-info{top:14px;inset-inline-start:28px;background:var(--orange);color:var(--on-orange)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer{padding:16px 8px 6px;border-top:0;background:transparent}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer > div{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer :is(.price,.tutor-course-price){font-family:var(--font-d);font-size:24px;font-weight:400;line-height:1.15;color:var(--charcoal)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer :is(.price,.tutor-course-price) del{margin-right:6px;font-size:.62em;opacity:.6}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer :is(.price,.tutor-course-price) ins{text-decoration:none}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer .list-item-button{flex:1 0 auto}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer .tutor-btn{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;height:46px;padding:0 6px 0 18px;border:0;border-radius:999px;background:var(--charcoal);color:var(--bone-hi);font-family:var(--font-d);font-size:15.5px;font-weight:400;transition:background .2s}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card:hover .tutor-card-footer .tutor-btn{background:#000;color:var(--bone-hi)}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer .tutor-btn [class*="tutor-icon-"]{order:2;display:grid;place-items:center;flex:none;width:34px;height:34px;margin:0 !important;border-radius:50%;background:var(--bone-hi);color:var(--charcoal);font-size:16px}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-card-footer .tutor-btn:not(:has([class*="tutor-icon-"]))::after{content:"";flex:none;width:34px;height:34px;border-radius:50%;background:var(--bone-hi) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161111' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center/15px no-repeat;transition:rotate .3s}
.ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card:hover .tutor-card-footer .tutor-btn::after{rotate:45deg}
@media (max-width:640px){
  .ahv-tutor:not(.ahv-tutor-dashboard) .tutor-course-card .tutor-course-name{font-size:20px}
}

/* ==========================================================================
   Course details page: v7 colours and shapes for the parts Tutor styles itself.
   Scoped to .tutor-course-details-page (light only; Tutor's dark mode is dashboard-only).
   ========================================================================== */

/* Rating, wishlist, share and meta in v7 ink instead of Tutor's cool grey */
.ahv-tutor .tutor-course-details-page .tutor-ratings-stars{color:var(--orange)}
.ahv-tutor .tutor-course-details-page .tutor-ratings-average{color:var(--charcoal);font-weight:600}
.ahv-tutor .tutor-course-details-page .tutor-ratings-count,.ahv-tutor .tutor-course-details-page .tutor-course-details-info{color:var(--ink-3)}
.ahv-tutor .tutor-course-details-page .tutor-course-details-info a{color:var(--charcoal)}
.ahv-tutor .tutor-course-details-page .tutor-course-details-actions > .tutor-btn-ghost{color:var(--ink-2);transition:color .2s}
.ahv-tutor .tutor-course-details-page .tutor-course-details-actions > .tutor-btn-ghost:hover{color:var(--orange-deep)}

/* Tabs: a solid v7 pill track instead of Tutor's translucent white bar.
   Tutor makes it sticky from 800px up at top:0 and z-index 500 (over the header capsule);
   here it sticks just below the capsule and stays under it. */
.ahv-tutor .tutor-course-details-page .tutor-course-details-tab .tutor-is-sticky{top:86px;z-index:40;background:transparent;backdrop-filter:none}
.admin-bar.ahv-tutor .tutor-course-details-page .tutor-course-details-tab .tutor-is-sticky{top:118px}
.ahv-tutor .tutor-course-details-page .tutor-course-details-tab .tutor-nav{gap:4px;padding:5px;border:1px solid var(--line);border-radius:999px;background:var(--bone-hi)}
.ahv-tutor .tutor-course-details-page .tutor-course-details-tab .tutor-nav .tutor-nav-link{margin:0;padding:9px 18px;border:0;border-radius:999px;color:var(--ink-2);transition:background .2s,color .2s}
.ahv-tutor .tutor-course-details-page .tutor-course-details-tab .tutor-nav .tutor-nav-link:hover{background:rgba(22,17,17,.06);color:var(--charcoal)}
.ahv-tutor .tutor-course-details-page .tutor-course-details-tab .tutor-nav .tutor-nav-link.is-active{background:var(--charcoal);color:var(--bone-hi)}
@media (max-width:640px){.ahv-tutor .tutor-course-details-page .tutor-course-details-tab .tutor-nav .tutor-nav-link{padding:8px 14px}}

/* "Show More": a v7 outline pill (Tutor's ghost button forces padding:0 !important),
   and the fade above it blends into the bone page instead of white */
.ahv-tutor .tutor-course-details-page .tutor-btn.tutor-btn-show-more{height:auto;padding:10px 20px !important;border:1.5px solid var(--charcoal);color:var(--charcoal);font-family:var(--font-d);font-size:15.5px;transition:background .2s,color .2s}
.ahv-tutor .tutor-course-details-page .tutor-btn-show-more .tutor-toggle-btn-icon{color:var(--orange)}
.ahv-tutor .tutor-course-details-page .tutor-btn.tutor-btn-show-more:hover{background:var(--charcoal);color:var(--bone-hi)}
.ahv-tutor .tutor-course-details-page .tutor-toggle-more-content.tutor-toggle-more-collapsed::before{background:linear-gradient(to bottom,transparent,var(--bone) 75%)}

/* Sidebar: every box fully rounded, warm surfaces, and space between the boxes
   (Tutor joins Material Includes / Requirements / Audience into one stack) */
.ahv-tutor .tutor-course-details-page .tutor-sidebar-card{overflow:hidden;border-color:var(--line)}
.ahv-tutor .tutor-course-details-page .tutor-sidebar-card > .tutor-card-body{background:var(--bone-hi)}
.ahv-tutor .tutor-course-details-page .tutor-single-course-sidebar-more > .tutor-course-details-widget{padding:24px 28px;border:1px solid var(--line);border-radius:24px;background:#fff}
.ahv-tutor .tutor-course-details-page .tutor-single-course-sidebar-more > .tutor-course-details-widget + .tutor-course-details-widget{margin-top:24px}
.ahv-tutor .tutor-course-details-page .tutor-single-course-sidebar-more .tutor-course-details-widget-title{margin-top:0}

/* "Earn a certificate" (Tutor Pro certificate showcase). Tutor draws it for a white page:
   a white box hugging the text, a thin grey frame on phones, a white laurel and a big tutor-my-52 gap.
   Here it is one v7 card: text on the left, the certificate on a bone tray with the laurel on the right,
   stacked below 768px. */
.ahv-tutor #tutor-certificate-showcase{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,340px);align-items:center;gap:clamp(24px,4vw,40px);margin:clamp(32px,5vw,48px) 0 0;padding:clamp(20px,3.5vw,32px);border:1px solid var(--line);border-radius:24px;background:var(--bone-hi)}
.ahv-tutor #tutor-certificate-showcase .tutor-cs-text{width:auto;padding:0;border-radius:0;background:none;text-align:left}
.ahv-tutor #tutor-certificate-showcase .tutor-cs-text > div{padding:0;border-radius:0;background:none}
.ahv-tutor #tutor-certificate-showcase .tutor-cs-text h3{margin:0 0 10px;white-space:normal;overflow:visible;text-overflow:clip}
.ahv-tutor #tutor-certificate-showcase .tutor-cs-text p{margin:0;font-size:16px;line-height:1.65;color:var(--ink-2)}
.ahv-tutor #tutor-certificate-showcase .tutor-cs-wrapper{position:relative;display:grid;place-items:center;width:auto;padding:28px 20px 36px;border-radius:18px;background:var(--bone);overflow:hidden}
.ahv-tutor #tutor-certificate-showcase .tutor-cs-wrapper::before{content:"";position:absolute;left:50%;bottom:8px;width:min(338px,100%);height:194px;transform:translateX(-50%);background:url("/wp-content/plugins/tutor-pro/addons/tutor-certificate/assets/images/certificate-frame.png") center bottom/contain no-repeat}
.ahv-tutor #tutor-certificate-showcase .tutor-cs-image-wrapper{position:relative;z-index:1;display:flex;justify-content:center;width:100%}
.ahv-tutor #tutor-certificate-showcase .tutor-cs-image-wrapper img{display:block;width:100%;max-width:252px;height:auto;border-radius:8px;box-shadow:0 18px 36px -18px rgba(22,17,17,.45)}
@media (max-width:767.98px){
  .ahv-tutor #tutor-certificate-showcase{grid-template-columns:minmax(0,1fr);gap:20px}
}

/* ==========================================================================
   Login limit alert (Tutor Pro device management).
   "Clear All Active Logins" was a small text link inside the pink alert and
   students kept missing it. Now it is a full-width v7 pill like the homepage
   .btn-bone: charcoal, with the orange arrow circle that turns on hover.
   Tutor's click handler checks that event.target IS the link, so the arrow is
   drawn with ::after. A child <i> like the homepage buttons would eat the click.
   ========================================================================== */
.tutor-alert:has(#tutor-remove-logins-wrapper){padding:16px 16px 16px 18px;border:1px solid rgba(178,60,10,.16);border-radius:20px;background:#FCE9E1;color:var(--charcoal)}
/* Text beside the icon, button on its own row across the whole alert */
.tutor-alert:has(#tutor-remove-logins-wrapper) .tutor-alert-content{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:0 10px;font-size:15px;line-height:1.55}
.tutor-alert:has(#tutor-remove-logins-wrapper) .tutor-alert-icon{margin-top:2px;color:var(--orange-deep)}
.tutor-alert:has(#tutor-remove-logins-wrapper) .tutor-alert-text{display:contents;font-size:15px;line-height:1.55;color:var(--charcoal)}
#tutor-remove-logins-wrapper{grid-column:1 / -1;margin-top:16px}
#tutor-remove-active-logins{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;height:54px;padding:0 8px 0 24px;border-radius:999px;background:var(--charcoal);color:var(--bone-hi) !important;font-family:var(--font-d);font-size:16.5px;line-height:1;text-decoration:none;box-shadow:0 16px 30px -16px rgba(22,17,17,.6);transition:transform .2s,background .2s,box-shadow .2s}
#tutor-remove-active-logins::after{content:"";flex:none;width:38px;height:38px;border-radius:50%;background:var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center/17px no-repeat;transition:rotate .25s}
#tutor-remove-active-logins:hover{background:#000;transform:translateY(-2px)}
#tutor-remove-active-logins:hover::after{rotate:-45deg}
#tutor-remove-active-logins:focus-visible{outline:2px solid var(--orange);outline-offset:3px}
/* "Please wait..." while Tutor clears the sessions: a dimmed pill of the same size, so nothing jumps */
#tutor-remove-logins-wrapper > span{display:flex;align-items:center;justify-content:center;height:54px;border-radius:999px;background:rgba(22,17,17,.08);color:var(--ink-2) !important;font-family:var(--font-d);font-size:16px}
/* Done: Tutor swaps in "All of your active login sessions have been removed" but keeps
   Tutor 4's error colours (its JS only recolours the old .tutor-warning alert), so show it as success */
.tutor-alert.tutor-alert-error:has(> .tutor-alert-content.tutor-gap-1){padding:16px 18px;border:1px solid rgba(36,161,72,.22);border-radius:20px;background:#E7F5EC;color:var(--charcoal)}
.tutor-alert.tutor-alert-error:has(> .tutor-alert-content.tutor-gap-1) .tutor-alert-content{gap:10px}
.tutor-alert.tutor-alert-error:has(> .tutor-alert-content.tutor-gap-1) .tutor-alert-text{font-size:15px;line-height:1.55;color:var(--charcoal)}
.tutor-alert.tutor-alert-error:has(> .tutor-alert-content.tutor-gap-1) .tutor-alert-icon svg{display:none}
.tutor-alert.tutor-alert-error:has(> .tutor-alert-content.tutor-gap-1) .tutor-alert-icon::before{content:"";display:block;width:20px;height:20px;margin-top:2px;border-radius:50%;background:#1E7F3A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat}
