/**
 * صفحة منصة واحدة — قريب من auction-agents-core + شبكة بطاقات أوكشن ويك.
 */

.awp-platform-single-page {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 16px 32px;
    font-family: 'Segoe UI', Tahoma, Arial, 'Arabic UI Text', 'Arabic Typesetting', sans-serif;
    box-sizing: border-box;
}

/* ——— Breadcrumb (مطابق تقريباً لـ AAC) ——— */
.awp-breadcrumb {
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.awp-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

.awp-breadcrumb-item a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.awp-breadcrumb-item a:hover {
    color: #005a87;
    text-decoration: underline;
}

.awp-breadcrumb-current {
    color: #333;
    font-weight: 500;
}

.awp-breadcrumb-separator {
    color: #ccc;
    user-select: none;
    font-size: 12px;
}

/* ——— غلاف الملف التعريفي ——— */
.awp-profile-shell {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    background: #fff;
    border: 1px solid #e8ecf0;
}

.awp-profile-cover {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #e8ecf0 0%, #f1f5f9 100%);
    overflow: hidden;
}

.awp-profile-cover-inner {
    position: absolute;
    inset: 0;
}

.awp-profile-cover-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 640px) {
    .awp-profile-cover {
        height: 200px;
    }
}

.awp-profile-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    padding: 1.25rem 1.25rem 1rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.awp-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.awp-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.awp-profile-avatar-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea33 0%, #764ba233 100%);
}

.awp-profile-main {
    flex: 1;
    min-width: 0;
}

.awp-profile-name-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.awp-profile-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.awp-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.awp-profile-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3e9af1;
    color: #fff;
}

.awp-profile-badge-link {
    color: #0073aa;
    text-decoration: none;
}

.awp-profile-badge-link:hover {
    text-decoration: underline;
}

.awp-profile-about {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 12px;
}

.awp-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.awp-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.awp-btn-outline:hover {
    border-color: #0073aa;
    color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.12);
}

/* شريط الإحصائيات */
.awp-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 16px 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 720px) {
    .awp-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

.awp-stats-bar-item {
    text-align: center;
    padding: 12px 8px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.awp-stats-bar-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f375a;
    line-height: 1.2;
}

.awp-stats-bar-license {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f375a;
    line-height: 1.35;
    word-break: break-word;
}

.awp-stats-bar-item--license .awp-stats-bar-lbl {
    margin-top: 6px;
}

.awp-stats-bar-lbl {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    display: block;
}

.awp-stats-bar-item--live .awp-stats-bar-num {
    color: #2563eb;
}

.awp-stats-bar-item--soon .awp-stats-bar-num {
    color: #b45309;
}

.awp-stats-bar-item--past .awp-stats-bar-num {
    color: #64748b;
}

/* ——— أقسام الشبكة ——— */
.awp-mec-section {
    margin-bottom: 2.5rem;
}

.awp-mec-section__title {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

/* تخطيط الشبكة — يتكامل مع attempts-grid.css؛ احتياط إن لم تُحمَّل */
.awp-platform-single-page .awp-mec-section .aw-attempts-grid {
    margin-bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: stretch;
}

@media (min-width: 768px) and (max-width: 991px) {
    .awp-platform-single-page .awp-mec-section .aw-attempts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .awp-platform-single-page .awp-mec-section .aw-attempts-grid {
        grid-template-columns: 1fr;
    }
}

.awp-mec-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
    margin: 0;
}

/* ترقيم المزادات (مثل وكلاء AAC + تدرج نشط) */
.awp-auctions-pagination {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.awp-pagination-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    direction: rtl;
}

.awp-pagination-list a,
.awp-pagination-list span {
    display: inline-block;
    padding: 8px 14px;
    min-width: 44px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #475569;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

.awp-pagination-list a:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.awp-pagination-current {
    background: linear-gradient(135deg, #0f375a 0%, #3e9799 100%);
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 600;
}

.awp-pagination-prev,
.awp-pagination-next {
    font-weight: 600;
}

/* ——— بطاقة مزاد ——— */
.awp-mec-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.awp-mec-card:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    transform: translateY(-3px);
}

.awp-mec-card__media-link {
    display: block;
    text-decoration: none;
}

.awp-mec-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f1f5f9;
    overflow: hidden;
}

.awp-mec-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.awp-mec-card__media-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

.awp-mec-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.awp-mec-card__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.awp-mec-card__badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.awp-mec-card__badge--live {
    background: #2563eb;
}

.awp-mec-card__badge--upcoming {
    background: #d97706;
}

.awp-mec-card__badge--past {
    background: #64748b;
}

.awp-mec-card__fav {
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: default;
    user-select: none;
}

.awp-mec-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.4;
    color: #0f375a;
}

.awp-mec-card__title a {
    color: inherit;
    text-decoration: none;
}

.awp-mec-card__title a:hover {
    color: #459a96;
}

.awp-mec-card__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #64748b;
}

.awp-mec-card__meta-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.awp-mec-card__meta-icon {
    flex-shrink: 0;
    color: #94a3b8;
    margin-top: 2px;
}

.awp-mec-card__countdown-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fafbfc;
}

.awp-mec-card__countdown-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.awp-mec-card__countdown {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    text-align: center;
}

.awp-mec-card__cd-unit {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 4px;
    min-width: 0;
}

.awp-mec-card__cd-val {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f375a;
    line-height: 1.2;
}

.awp-mec-card__cd-lbl {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

.awp-mec-card__dates {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #64748b;
}

.awp-mec-card__footer {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.awp-mec-card__cta {
    flex: 1;
    min-width: 140px;
    text-align: center;
    padding: 12px 16px;
    border-radius: 10px;
    background: #459a96;
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(69, 154, 150, 0.35);
}

.awp-mec-card__cta:hover {
    background: #3a8581;
    transform: translateY(-1px);
    color: #fff !important;
}

.awp-mec-card__assets {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
