/* ============================================================
   Sidebar Cards – isolated styles (supplier sidebar)
   ============================================================ */

/* Base sidebar card */
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
    position: sticky;
    top: 90px;
}

.sidebar-card h3,
.sidebar-card-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800;
}

.sidebar-card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 160ms ease;
}

.sidebar-card-title-link:hover {
    color: var(--vp-primary, #3976e8);
}

.sidebar-card-title-link:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--vp-primary, #3976e8);
    outline-offset: 3px;
}

/* Contact card */
.sidebar-contact-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    height: 44px;
    min-height: 44px;
    max-height: 50px;
    border: 2px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
}

.sidebar-contact-item[href]:hover {
    filter: brightness(0.96);
}

.sidebar-contact-item:focus-visible {
    outline: 3px solid var(--vp-primary, #3976e8);
    outline-offset: 2px;
}

.sidebar-contact-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
}

.sidebar-contact-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Platform background colors */
.contact-phone { background: #dcfce7; border-color: #4ade80; color: #14532d; }
.contact-website { background: #dbeafe; border-color: #60a5fa; color: #1e3a8a; }
.contact-email { background: #fee2e2; border-color: #f87171; color: #991b1b; }
.contact-veida { background: #ccfbf1; border-color: #2dd4bf; color: #115e59; }
.contact-eitaa { background: #ffedd5; border-color: #fb923c; color: #9c4221; }
.contact-bale { background: #dbeafe; border-color: #60a5fa; color: #1d4ed8; }
.contact-imo { background: #f3f4f6; border-color: #9ca3af; color: #374151; }
.contact-telegram { background: #dbeafe; border-color: #60a5fa; color: #0e7490; }
.contact-rubika { background: #f5f3ff; border-color: #c084fc; color: #5b21b6; }
.contact-whatsapp { background: #dcfce7; border-color: #4ade80; color: #15803d; }
.contact-soroush { background: #f3e8ff; border-color: #d8b4fe; color: #6b21a8; }
.contact-instagram { background: linear-gradient(105deg, #fce7f3, #fbcfe8); border-color: #f472b6; color: #9d174d; }
.contact-other { background: #f1f5f9; border-color: #94a3b8; color: #475569; }

/* Pinned Announcements card */
.announcement-list {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-direction: column;
    gap: 12px;
}
/* Blogs card */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.blog-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}
.blog-item:last-child {
    border-bottom: none;
}
.blog-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef1f6;
    flex-shrink: 0;
    object-fit: cover;
}
.blog-info {
    flex: 1;
}
.blog-title {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.blog-summary {
    display: block;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.blog-view-all {
    display: block;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--vp-primary);
    text-align: center;
    text-decoration: none;
}
.blog-view-all:hover {
    background: #eef1f6;
}

.sidebar-card-blogs {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
.sidebar-blog-list {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-direction: column;
    gap: 14px;
}
.sidebar-blog-item {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--vp-primary, #3976e8) 12%, var(--border, #e6eaf0));
    border-radius: 15px;
    background: var(--surface, #fff);
    box-shadow: 0 5px 16px rgba(27, 40, 62, 0.045);
    text-decoration: none;
    color: inherit;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.sidebar-blog-item:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--vp-primary, #3976e8) 32%, var(--border, #e6eaf0));
    box-shadow: 0 10px 22px rgba(27, 40, 62, 0.09);
}
.sidebar-blog-item:focus-visible,
.sidebar-blog-view-all:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--vp-primary, #3976e8) 46%, transparent);
    outline-offset: 3px;
}
.sidebar-blog-cover {
    position: relative;
    display: grid;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    place-items: center;
    overflow: hidden;
    background: color-mix(in srgb, var(--vp-primary, #3976e8) 8%, #eef2f8);
}
.sidebar-blog-cover > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}
.sidebar-blog-item:hover .sidebar-blog-cover > img {
    transform: scale(1.04);
}
.sidebar-blog-cover.is-placeholder {
    background:
        radial-gradient(circle at 75% 15%, rgba(255, 255, 255, 0.9), transparent 34%),
        color-mix(in srgb, var(--vp-primary, #3976e8) 8%, #eef2f8);
    color: color-mix(in srgb, var(--vp-primary, #3976e8) 60%, #91a1b7);
}
.sidebar-blog-cover.is-placeholder > svg {
    width: 42px;
    height: 42px;
}
.sidebar-blog-featured,
.sidebar-blog-tag {
    position: absolute;
    bottom: 9px;
    max-width: 55%;
    padding: 4px 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background: rgba(20, 31, 51, 0.72);
    color: #fff;
    font-size: 0.63rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(7px);
}
.sidebar-blog-featured {
    right: 9px;
    background: color-mix(in srgb, var(--vp-primary, #3976e8) 88%, #16243c);
}
.sidebar-blog-tag {
    left: 9px;
}
.sidebar-blog-copy {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1;
    flex-direction: column;
    padding: 12px 13px 13px;
    box-sizing: border-box;
}
.sidebar-blog-meta {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted, #8490a3);
    font-size: 0.65rem;
}
.sidebar-blog-meta > span {
    color: var(--vp-primary, #3976e8);
    font-weight: 850;
}
.sidebar-blog-title {
    display: -webkit-box;
    width: 100%;
    min-width: 0;
    margin-top: 7px;
    overflow: hidden;
    color: var(--text, #1d2939);
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1.7;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.sidebar-blog-summary {
    display: -webkit-box;
    width: 100%;
    min-width: 0;
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted, #667085);
    font-size: 0.74rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.sidebar-blog-footer {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid color-mix(in srgb, var(--vp-primary, #3976e8) 10%, var(--border, #e6eaf0));
    color: var(--vp-primary, #3976e8);
    font-size: 0.7rem;
    font-weight: 850;
}
.sidebar-blog-footer svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
.sidebar-blog-view-all {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--vp-primary, #3976e8) 18%, var(--border, #e6eaf0));
    border-radius: 11px;
    background: color-mix(in srgb, var(--vp-primary, #3976e8) 4%, #fff);
    color: var(--vp-primary, #3976e8);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease;
}
.sidebar-blog-view-all:hover {
    border-color: color-mix(in srgb, var(--vp-primary, #3976e8) 32%, var(--border, #e6eaf0));
    background: color-mix(in srgb, var(--vp-primary, #3976e8) 8%, #fff);
}
.sidebar-blog-view-all svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}
@media (prefers-reduced-motion: reduce) {
    .sidebar-blog-item,
    .sidebar-blog-cover > img,
    .sidebar-blog-view-all {
        transition: none;
    }
}

/* Announcement cards */
.announcement-list {
    gap: 14px;
}
.sidebar-announcement-item {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--vp-primary, #3976e8) 12%, var(--border, #e6eaf0));
    border-radius: 15px;
    background: var(--surface, #fff);
    box-shadow: 0 5px 16px rgba(27, 40, 62, 0.045);
    color: inherit;
    text-decoration: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.sidebar-announcement-item:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--vp-primary, #3976e8) 32%, var(--border, #e6eaf0));
    box-shadow: 0 10px 22px rgba(27, 40, 62, 0.09);
}
.sidebar-announcement-item:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--vp-primary, #3976e8) 46%, transparent);
    outline-offset: 3px;
}
.sidebar-announcement-media {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        radial-gradient(circle at 75% 15%, rgba(255, 255, 255, 0.88), transparent 34%),
        color-mix(in srgb, var(--vp-primary, #3976e8) 9%, #eef2f8);
}
.sidebar-announcement-media > img,
.sidebar-announcement-media > video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sidebar-announcement-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(20, 31, 51, 0.62);
    color: #fff;
    font-size: 0.78rem;
    backdrop-filter: blur(7px);
}
.sidebar-announcement-media-count,
.sidebar-announcement-pin {
    position: absolute;
    top: 9px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 999px;
    background: rgba(20, 31, 51, 0.7);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    backdrop-filter: blur(7px);
}
.sidebar-announcement-media-count {
    right: 9px;
}
.sidebar-announcement-pin {
    left: 9px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--vp-primary, #3976e8);
}
.sidebar-announcement-copy {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 13px 14px;
    box-sizing: border-box;
}
.sidebar-announcement-item.is-text-only .sidebar-announcement-copy {
    min-height: 112px;
    justify-content: center;
    background:
        radial-gradient(circle at 100% 0, color-mix(in srgb, var(--vp-primary, #3976e8) 9%, transparent), transparent 48%),
        var(--surface, #fff);
}
.sidebar-announcement-meta {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    color: var(--muted, #8490a3);
    font-size: 0.66rem;
}
.sidebar-announcement-meta > span {
    color: var(--vp-primary, #3976e8);
    font-weight: 850;
}
.sidebar-announcement-title {
    display: -webkit-box;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    color: var(--text, #1d2939);
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.65;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.sidebar-announcement-summary {
    display: -webkit-box;
    width: 100%;
    min-width: 0;
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted, #667085);
    font-size: 0.76rem;
    line-height: 1.75;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.sidebar-announcement-cta,
.sidebar-announcement-kind {
    margin-top: 7px;
    color: var(--vp-primary, #3976e8);
    font-size: 0.7rem;
    font-weight: 750;
}
.sidebar-announcement-kind {
    align-self: flex-end;
    margin-top: auto;
    padding-top: 7px;
}
.sidebar-announcement-summary + .sidebar-announcement-kind {
    padding-top: 5px;
}
@media (prefers-reduced-motion: reduce) {
    .sidebar-announcement-item {
        transition: none;
    }
}

/* Reviews card */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.review-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.review-item:last-child {
    border-bottom: none;
}
.review-header {
    display: flex;
    gap: 10px;
    align-items: start;
}
.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--vp-primary, #b45309), var(--vp-secondary, #78350f));
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    object-fit: cover;
}
.review-avatar-default {
    background: linear-gradient(135deg, var(--vp-primary, #b45309), var(--vp-secondary, #78350f));
}
.review-meta {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.review-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}
.review-rating {
    font-size: 12px;
    color: #f59e0b;
}
.review-rating .star {
    font-size: 12px;
    margin-right: 1px;
}
.review-rating .star.empty {
    color: #e5e7eb;
}
.review-comment {
    font-size: 13px;
    color: var(--text);
    margin: 0;
    line-height: 1.5;
}
.review-date {
    font-size: 11px;
    color: var(--muted);
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 24px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-card {
        padding: 16px;
        position: static;
        top: auto;
    }
    .sidebar-card h3,
    .sidebar-card-title {
        font-size: 15px;
    }
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-column > .sidebar-card {
    position: static;
    min-width: 0;
    margin: 0;
}

.sidebar-card-contact {
    overflow: hidden;
}

.sidebar-card-announcements {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.sidebar-contact-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    height: 44px;
    min-height: 44px;
    max-height: 50px;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
}

.sidebar-contact-item[href]:hover {
    filter: brightness(0.96);
}

.sidebar-contact-item:focus-visible {
    outline: 3px solid var(--vp-primary, #3976e8);
    outline-offset: 2px;
}

.sidebar-contact-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    object-fit: contain;
}

.sidebar-contact-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.contact-phone { background: #dcfce7; border-color: #4ade80; color: #14532d; }
.contact-website { background: #dbeafe; border-color: #60a5fa; color: #1e3a8a; }
.contact-email { background: #fee2e2; border-color: #f87171; color: #991b1b; }
.contact-veida { background: #ccfbf1; border-color: #2dd4bf; color: #115e59; }
.contact-eitaa { background: #ffedd5; border-color: #fb923c; color: #9c4221; }
.contact-bale { background: #dbeafe; border-color: #60a5fa; color: #1d4ed8; }
.contact-imo { background: #f3f4f6; border-color: #9ca3af; color: #374151; }
.contact-telegram { background: #dbeafe; border-color: #60a5fa; color: #0e7490; }
.contact-rubika { background: #f5f3ff; border-color: #c084fc; color: #5b21b6; }
.contact-whatsapp { background: #dcfce7; border-color: #4ade80; color: #15803d; }
.contact-soroush { background: #f3e8ff; border-color: #d8b4fe; color: #6b21a8; }
.contact-instagram { background: linear-gradient(105deg, #fce7f3, #fbcfe8); border-color: #f472b6; color: #9d174d; }
.contact-other { background: #f1f5f9; border-color: #94a3b8; color: #475569; }

.sidebar-card-contact .sidebar-card-title {
    margin-bottom: 12px;
}

@media (max-width: 560px) {
    .sidebar-contact-item {
        min-height: 40px;
        height: 40px;
    }
}

@media (max-width: 700px) {
    .supplier-content > .sidebar-column {
        position: relative;
        margin-top: 12px;
        padding-top: 24px;
        border-top: 1px solid var(--border);
    }

    .supplier-content > .sidebar-column::before {
        position: absolute;
        top: -2px;
        left: 50%;
        width: 56px;
        height: 3px;
        border-radius: 999px;
        background: var(--vp-primary, #3976e8);
        content: "";
        transform: translateX(-50%);
    }
}
