/**
 * PROMOTER CARDS & DETAILS MODAL
 * Styles for the new promoter card grid and details view
 */

/* ==========================================================================
   PROMOTER CARD GRID
   ========================================================================== */

.mec-promoters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.mec-promoter-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.mec-promoter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

/* Level Styles */
.mec-promoter-card.has-diamond {
    border-top: 4px solid #38bdf8;
}

.mec-promoter-card.has-gold {
    border-top: 4px solid #fbbf24;
}

.mec-promoter-card.has-silver {
    border-top: 4px solid #94a3b8;
}

/* ==========================================================================
   SIMPLIFIED PROMOTER CARDS (New Design)
   ========================================================================== */

.mec-promoter-card-simple {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    text-align: center;
}

.mec-promoter-card-simple:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.5);
}

.mec-promoter-card-simple .mec-promoter-card-header {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    margin-bottom: 16px;
}

.mec-promoter-card-simple .mec-promoter-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f3f4f6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #e2e8f0;
    transition: all 0.3s;
}

.mec-promoter-card-simple:hover .mec-promoter-avatar {
    border-color: #667eea;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.mec-promoter-card-simple .mec-promoter-card-body {
    padding: 0;
}

.mec-promoter-card-simple .mec-promoter-username {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.mec-promoter-card-simple .mec-promoter-tickets {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.mec-promoter-card-simple .mec-promoter-tickets i {
    font-size: 24px;
    opacity: 0.9;
}

.mec-promoter-card-simple .mec-ticket-count {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mec-promoter-card-simple .mec-ticket-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.9;
}


/* Header & Avatar */
.mec-promoter-card-header {
    padding: 24px 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: linear-gradient(to bottom, #f8fafc 50%, white 50%);
}

.mec-promoter-level {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mec-level-diamond {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.mec-level-gold {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.mec-level-silver {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.mec-promoter-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
    background: #e2e8f0;
}

/* Body Info */
.mec-promoter-card-body {
    padding: 10px 20px 20px;
    text-align: center;
    flex: 1;
}

.mec-promoter-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.mec-promoter-username {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px 0;
    font-weight: 500;
}

/* Quick Stats */
.mec-promoter-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    background: #f9fafb;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
}

.mec-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.mec-stat-item i {
    font-size: 18px;
    color: #9ca3af;
}

.mec-stat-item:first-child i {
    color: #10b981;
}

/* Tickets green */
.mec-stat-item:last-child i {
    color: #667eea;
}

/* Sales purple */

.mec-stat-item>div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.mec-stat-value {
    font-weight: 800;
    font-size: 15px;
    color: #1f2937;
}

.mec-stat-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    font-weight: 600;
}

/* Footer Action */
.mec-promoter-card-footer {
    padding: 15px 20px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.mec-promoter-card-footer span {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mec-view-details-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mec-view-details-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
    border-color: #d1d5db;
}

.mec-promoter-card:hover .mec-view-details-btn {
    background: #1f2937;
    color: white;
    border-color: #1f2937;
}

/* ==========================================================================
   DETAILS MODAL
   ========================================================================== */

#mec-promoter-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#mec-promoter-details-modal.active {
    opacity: 1;
    visibility: visible;
}

#mec-promoter-details-modal .mec-modal-content {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#mec-promoter-details-modal.active .mec-modal-content {
    transform: translateY(0);
}

/* Modal Header */
.mec-details-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.mec-details-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mec-details-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mec-details-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: white;
}

.mec-details-info h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mec-details-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.mec-details-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Model Body */
.mec-details-body {
    padding: 30px;
    overflow-y: auto;
}

.mec-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.mec-detail-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.mec-detail-stat i {
    font-size: 24px;
    margin-bottom: 10px;
    display: inline-block;
}

.mec-detail-stat .value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 5px;
}

.mec-detail-stat .label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Detailed Sections */
.mec-details-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.mec-details-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

/* Modal Actions Footer */
.mec-details-footer {
    padding: 20px 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 768px) {
    .mec-details-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .mec-details-meta {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }

    .mec-details-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mec-details-sections {
        grid-template-columns: 1fr;
    }

    .mec-details-footer {
        flex-direction: column;
    }

    .mec-details-footer button {
        width: 100%;
    }
}