/**
 * Promotions Section Styles
 * CSS cho phần khuyến mãi hấp dẫn
 * 
 * @package SCode_Theme
 */

/* Promotions Container */
.promotions-section {
    margin-bottom: 1.5rem;
}

.promotions-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Promotions Title */
.promotions-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Note: Icon is included in the title text from PHP, no ::before needed */

/* Promotions Box */
.promotions-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 50%, #fecaca 100%);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(251, 146, 60, 0.2);
    position: relative;
    overflow: hidden;
}

.promotions-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #ef4444, #f59e0b);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 200% 0;
    }

    50% {
        background-position: -200% 0;
    }
}

/* Promotion Item */
.promotion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.promotion-item:last-child {
    margin-bottom: 0;
}

.promotion-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Promotion Number */
.promotion-number {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
    position: relative;
    z-index: 2;
}

.promotion-number::after {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.3;
    filter: blur(4px);
}

/* Promotion Icon */
.promotion-icon {
    font-size: 1.125rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Promotion Text */
.promotion-text {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .promotions-box {
        padding: 1rem;
        border-radius: 8px;
    }

    .promotion-item {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding: 0.375rem;
    }

    .promotion-number {
        width: 20px;
        height: 20px;
        font-size: 0.6875rem;
    }

    .promotion-icon {
        font-size: 1rem;
        width: 20px;
        height: 20px;
    }

    .promotion-text {
        font-size: 0.8125rem;
    }

    .promotions-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .promotions-box {
        padding: 0.75rem;
    }

    .promotion-item {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.5rem 0.25rem;
        flex-wrap: nowrap;
    }

    .promotion-item:hover {
        transform: none;
    }

    .promotion-number {
        flex-shrink: 0;
        margin-top: 2px;
    }

    .promotion-icon {
        flex-shrink: 0;
        margin-top: 0;
    }

    .promotion-text {
        flex: 1;
        font-size: 0.8125rem;
        line-height: 1.4;
        word-break: break-word;
    }
}

/* Animation Effects */
.promotion-item {
    animation: slideInUp 0.6s ease-out;
}

.promotion-item:nth-child(1) {
    animation-delay: 0.1s;
}

.promotion-item:nth-child(2) {
    animation-delay: 0.2s;
}

.promotion-item:nth-child(3) {
    animation-delay: 0.3s;
}

.promotion-item:nth-child(4) {
    animation-delay: 0.4s;
}

.promotion-item:nth-child(5) {
    animation-delay: 0.5s;
}

.promotion-item:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Special Effects */
.promotions-box {
    position: relative;
}

.promotions-box::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .promotions-title {
        color: #f9fafb;
    }

    .promotions-box {
        background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #4b5563 100%);
        border-color: rgba(75, 85, 99, 0.3);
    }

    .promotion-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .promotion-text {
        color: #e5e7eb;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
}

/* Print Styles */
@media print {
    .promotions-box {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    .promotion-item:hover {
        transform: none !important;
        background: none !important;
    }

    .promotions-box::before,
    .promotions-box::after {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .promotions-box {
        background: white;
        border: 2px solid #000;
    }

    .promotion-number {
        background: #000;
        color: white;
    }

    .promotion-text {
        color: #000;
        text-shadow: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .promotion-item {
        animation: none;
    }

    .promotions-box::before,
    .promotions-box::after {
        animation: none;
    }

    .promotion-item:hover {
        transform: none;
    }
}