/**
 * Wingo Product Expiry - Frontend Styles
 */

/* 到期通知樣式 */
.wingo-expiry-notice {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.wingo-expiry-notice.expired {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wingo-expiry-notice.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.wingo-expiry-notice p {
    margin: 0;
    font-weight: 500;
}

/* 已到期商品按鈕樣式 */
.wingo-expired-button {
    background-color: #6c757d !important;
    color: #fff !important;
    cursor: not-allowed !important;
    opacity: 0.8;
    border-color: #6c757d !important;
}

.wingo-expired-button:hover {
    background-color: #5a6268 !important;
    color: #fff !important;
    text-decoration: none;
}

/* 商品列表中的到期標記 */
.products .product .wingo-expired-button {
    width: 100%;
    text-align: center;
    font-size: 13px;
    padding: 8px 12px;
}

/* 單一商品頁面樣式調整 */
.single-product .wingo-expiry-notice {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 倒數計時樣式（如果需要） */
.wingo-countdown {
    display: inline-block;
    padding: 5px 10px;
    background-color: #ffeaa7;
    color: #2d3436;
    border-radius: 3px;
    font-size: 13px;
    margin-top: 10px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .wingo-expiry-notice {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .wingo-expired-button {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* 商品已到期時的額外視覺提示 */
.product.expired-product {
    position: relative;
}

.product.expired-product::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.05);
    pointer-events: none;
}

/* 到期標籤樣式 */
.wingo-expiry-badge {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 10px;
}

/* 管理員檢視時的特殊樣式 */
.logged-in.administrator .wingo-expiry-notice {
    border-width: 2px;
    border-style: dashed;
}

/* 動畫效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.wingo-expiry-notice.warning {
    animation: pulse 2s infinite;
}