/* Author storefront: Envato-style portfolio cards, follower tabs and
   follow button. Every color uses the shared --nm-* design tokens so the
   whole page is controlled from NoorMart -> Design System. */

.nm-author-cover-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.nm-follow-button.is-following{background:var(--nm-primary);border-color:var(--nm-primary);color:#fff}
.nm-tab-count{display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 6px;margin-left:6px;border-radius:99px;background:var(--nm-soft);color:var(--nm-primary);font-size:.72rem;font-weight:800}
.nm-author-tabs button.is-active .nm-tab-count{background:var(--nm-primary);color:#fff}

/* Portfolio list (Envato style) */
.nm-author-portfolio{display:grid;gap:16px}
.nm-author-portfolio--grid{grid-template-columns:repeat(2,1fr)}
.nm-author-item{position:relative;display:grid;grid-template-columns:150px minmax(0,1fr) 220px;gap:20px;padding:18px;border:1px solid var(--nm-border);border-radius:var(--nm-radius);background:var(--nm-card);box-shadow:0 6px 18px rgba(15,23,42,.04);transition:box-shadow .2s ease,transform .2s ease}
.nm-author-item:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(15,23,42,.09)}
.nm-author-item__thumb{display:block;align-self:start;border-radius:calc(var(--nm-radius) - 4px);overflow:hidden;border:1px solid var(--nm-border);background:var(--nm-soft)}
.nm-author-item__thumb img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover}
.nm-author-item__title{margin:0;font-size:1.05rem;line-height:1.35}
.nm-author-item__title a{color:var(--nm-dark)}
.nm-author-item__title a:hover{color:var(--nm-primary)}
.nm-author-item__cats{margin:6px 0 0;color:var(--nm-muted);font-size:.82rem}
.nm-author-item__cats a{color:var(--nm-primary);font-weight:650}
.nm-author-item__excerpt{margin:10px 0 0;color:var(--nm-text);font-size:.88rem;line-height:1.55}
.nm-author-item__specs{display:flex;flex-wrap:wrap;gap:6px 16px;margin:10px 0 0;color:var(--nm-muted);font-size:.78rem}
.nm-author-item__specs strong{color:var(--nm-dark)}
.nm-author-item__quick{display:flex;gap:8px;margin-top:12px}
.nm-author-item__quick a,.nm-author-item__quick button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid var(--nm-border);border-radius:8px;background:var(--nm-card);color:var(--nm-muted);cursor:pointer}
.nm-author-item__quick a:hover,.nm-author-item__quick button:hover{border-color:var(--nm-primary);color:var(--nm-primary);background:var(--nm-soft)}
.nm-author-item__meta{display:flex;flex-direction:column;align-items:flex-end;gap:8px;padding-left:20px;border-left:1px solid var(--nm-border);text-align:right}
.nm-author-item__price{color:var(--nm-dark);font-size:1.5rem;font-weight:850;letter-spacing:-.02em}
.nm-author-item__price del{color:var(--nm-muted);font-size:1rem;margin-right:6px}
.nm-author-item__price ins{text-decoration:none}
/* Stable Envato-style rating component. It does not rely on WooCommerce's
   global .star-rating rules, preventing accessibility text from leaking into
   the visible product-card layout. */
.nm-envato-rating{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;line-height:1}
.nm-envato-stars{display:inline-flex;align-items:center;gap:.08em;direction:ltr;white-space:nowrap;font-size:.96rem}
.nm-envato-star{position:relative;display:inline-grid;place-items:center;width:1em;height:1em;color:#d7dce5;font-family:Arial,sans-serif;font-size:1em;font-weight:900;line-height:1}
.nm-envato-star:after{content:"★";position:absolute;inset:0 auto 0 0;display:block;width:var(--nm-star-fill,0%);overflow:hidden;color:var(--nm-warning);white-space:nowrap}
.nm-envato-star>span{color:inherit}
.nm-envato-rating__count{color:var(--nm-muted);font-size:.76rem;font-weight:700;white-space:nowrap}
.nm-author-item__rating{display:flex;align-items:center;justify-content:flex-end;min-height:20px}
.nm-author-item__rating .nm-envato-rating{justify-content:flex-end}
.nm-author-item__sales{color:var(--nm-muted);font-size:.8rem;font-weight:700}
.nm-author-item__sales i{color:var(--nm-primary)}
.nm-author-item__actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin-top:auto;width:100%}
.nm-author-item__actions .nm-button{justify-content:center}
/* Keep author-card cart/options actions on-brand even when the global card
   button controls are configured with a pale background. */
.woocommerce .nm-author-item__actions .nm-author-cart-button,
.nm-author-item__actions .nm-author-cart-button{background:var(--nm-primary)!important;color:#fff!important;border:1px solid var(--nm-primary)!important;box-shadow:0 8px 18px rgba(17,24,39,.10)}
.woocommerce .nm-author-item__actions .nm-author-cart-button:hover,
.woocommerce .nm-author-item__actions .nm-author-cart-button:focus-visible,
.nm-author-item__actions .nm-author-cart-button:hover,
.nm-author-item__actions .nm-author-cart-button:focus-visible{background:var(--nm-primary-dark)!important;color:#fff!important;border-color:var(--nm-primary-dark)!important;box-shadow:0 10px 24px rgba(17,24,39,.16);transform:translateY(-1px)}
.woocommerce .nm-author-item__actions .nm-author-cart-button.loading,
.nm-author-item__actions .nm-author-cart-button.loading{opacity:.72;pointer-events:none}
.nm-author-item__actions .nm-buy-now-button{background:var(--nm-accent);border-color:transparent;color:#fff}
.nm-author-item__actions .nm-buy-now-button:hover{background:var(--nm-primary);color:#fff}

/* Grid variant */
.nm-author-item--grid{grid-template-columns:1fr}
.nm-author-item--grid .nm-author-item__meta{align-items:flex-start;padding-left:0;border-left:0;text-align:left;margin-top:6px}
.nm-author-item--grid .nm-author-item__rating,.nm-author-item--grid .nm-envato-rating,.nm-author-item--grid .nm-author-item__sales{justify-content:flex-start}
.nm-author-item--grid .nm-author-item__actions{flex-direction:row}
.nm-author-item--grid .nm-author-item__actions .nm-button{flex:1}

/* Followers / Following lists */
.nm-follow-list{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.nm-follow-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border:1px solid var(--nm-border);border-radius:var(--nm-radius);background:var(--nm-card)}
.nm-follow-row__identity{display:flex;align-items:center;gap:12px;color:var(--nm-dark)}
.nm-follow-row__identity img{border-radius:50%}
.nm-follow-row__identity strong{display:block;font-size:.95rem}
.nm-follow-row__identity small{display:block;color:var(--nm-muted)}
.nm-follow-row__identity:hover strong{color:var(--nm-primary)}

/* Sidebar about panel */
.nm-author-about{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.nm-author-about img{border-radius:12px}
.nm-author-about p{margin:0;color:var(--nm-muted);font-size:.85rem}
.nm-author-marketplace__full .nm-author-portfolio-main{max-width:none}

@media(max-width:900px){
.nm-author-item{grid-template-columns:120px 1fr}
.nm-author-item__meta{grid-column:1/-1;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;border-left:0;padding-left:0;border-top:1px solid var(--nm-border);padding-top:14px;text-align:left}
.nm-author-item__actions{flex-direction:row;width:auto;margin-top:0}
.nm-author-portfolio--grid{grid-template-columns:1fr}
.nm-follow-list{grid-template-columns:1fr}
}
@media(max-width:560px){
.nm-author-item{grid-template-columns:1fr}
}


/* Envato-inspired author-header performance panel. */
.nm-author-performance{gap:0}
.nm-author-performance>div{min-width:172px;padding:4px 28px}
.nm-author-performance>div+div{border-left:1px solid rgba(255,255,255,.20)}
.nm-author-performance__rating{align-items:flex-end}
.nm-author-performance .nm-envato-rating{justify-content:flex-end;margin-top:10px}
.nm-author-performance .nm-envato-stars{font-size:1.05rem}
.nm-author-performance .nm-envato-star{color:rgba(255,255,255,.28)}
.nm-author-performance .nm-envato-rating__count{color:#fff;font-size:.82rem;font-weight:750}
.nm-author-performance__label{color:#c9d4e8!important}

/* Center the list-card market metrics like Envato while retaining the grid
   card's left-aligned compact presentation. */
.nm-author-item--envato .nm-author-item__meta{align-items:center;text-align:center}
.nm-author-item--envato .nm-author-item__rating{justify-content:center}
.nm-author-item--envato .nm-envato-rating{justify-content:center;flex-wrap:wrap}
.nm-author-item--envato .nm-author-item__sales{display:inline-flex;align-items:center;justify-content:center;gap:6px}

@media(max-width:980px){
.nm-author-performance>div{min-width:0;padding:4px 22px}
}
@media(max-width:680px){
.nm-author-performance{align-items:stretch}
.nm-author-performance>div{flex:1;padding:2px 14px}
.nm-author-performance>div:first-child{padding-left:0}
.nm-author-performance>div:last-child{padding-right:0}
.nm-author-performance__rating{align-items:flex-start}
.nm-author-performance .nm-envato-rating{justify-content:flex-start}
}
@media(max-width:560px){
.nm-author-item--envato .nm-author-item__meta{align-items:stretch;text-align:left}
.nm-author-item--envato .nm-author-item__rating,.nm-author-item--envato .nm-envato-rating,.nm-author-item--envato .nm-author-item__sales{justify-content:flex-start}
.nm-author-item__actions .nm-button{width:100%}
}


/* Follow controls must remain readable on the dark author cover regardless of global button tokens. */
.nm-author-cover .nm-follow-button{background:#fff!important;border-color:#fff!important;color:var(--nm-primary)!important;box-shadow:0 8px 20px rgba(2,6,23,.18)}
.nm-author-cover .nm-follow-button:hover,.nm-author-cover .nm-follow-button:focus-visible{background:var(--nm-soft)!important;border-color:var(--nm-soft)!important;color:var(--nm-primary-dark)!important;transform:translateY(-1px)}
.nm-author-cover .nm-follow-button.is-following{background:rgba(255,255,255,.14)!important;border-color:rgba(255,255,255,.64)!important;color:#fff!important;box-shadow:none}
.nm-author-cover .nm-follow-button.is-following:hover,.nm-author-cover .nm-follow-button.is-following:focus-visible{background:#fff!important;border-color:#fff!important;color:var(--nm-primary)!important}
