/* ==========================================================================
   MGG Core Frontend Styles - Grid & Card Layout chuẩn Magiamgia.com
   ========================================================================== */

.mgg-coupons-wrapper {
    margin: 20px 0;
    font-family: inherit;
}

/* Thanh bộ lọc khung giờ & thể loại */
.mgg-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.mgg-filter-btn {
    padding: 6px 14px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mgg-filter-btn:hover,
.mgg-filter-btn.active {
    background: #ee4d2d;
    color: #fff;
    border-color: #ee4d2d;
}

/* Lưới hiển thị danh sách thẻ mã */
.mgg-coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Thẻ mã giảm giá (Coupon Card) */
.mgg-coupon-card {
    background: #fff;
    border: 1px dashed #dcdcdc;
    border-radius: 8px;
    padding: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mgg-coupon-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #ee4d2d;
}

.mgg-card-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: #ee4d2d;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(238,77,45,0.3);
}

.mgg-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.mgg-platform-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
}

.mgg-discount-text {
    font-size: 18px;
    font-weight: 700;
    color: #ee4d2d;
    line-height: 1.2;
}

.mgg-min-spend {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.mgg-card-body {
    margin-bottom: 12px;
    font-size: 13px;
    color: #444;
}

.mgg-coupon-desc {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
}

.mgg-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
}

/* Nút bấm hành động kép Copy + Mở sàn */
.mgg-card-footer {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mgg-code-box {
    flex: 1;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    padding: 7px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    color: #d63031;
    text-align: center;
    letter-spacing: 0.5px;
    user-select: all;
}

.mgg-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ee4d2d;
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.mgg-btn-action:hover {
    background: #d63031;
}

.mgg-btn-action.mgg-copied {
    background: #27ae60 !important;
}

/* Tiến trình phần trăm còn lại */
.mgg-progress-bar {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin: 8px 0;
    overflow: hidden;
}

.mgg-progress-fill {
    height: 100%;
    background: #ee4d2d;
    border-radius: 2px;
}
