/* 通知列表表格樣式 */
.woocommerce-MyAccount-notifications {
    margin-bottom: 2em;
    border-collapse: collapse;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.woocommerce-MyAccount-notifications thead {
    background-color: #f8f9fa;
}

.woocommerce-MyAccount-notifications th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.woocommerce-MyAccount-notifications td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    color: #666;
    vertical-align: middle;
}

.woocommerce-MyAccount-notifications tr:last-child td {
    border-bottom: none;
}

.woocommerce-MyAccount-notifications tr:hover {
    background-color: #f8f9fa;
}

/* 查看詳情按鈕樣式 */
.woocommerce-MyAccount-notifications .button.view {
    background-color: #3498db;
    color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
    border: none;
    display: inline-block;
}

.woocommerce-MyAccount-notifications .button.view:hover {
    background-color: #2980b9;
}

/* 回應式設計 */
@media screen and (max-width: 768px) {
    .woocommerce-MyAccount-notifications thead {
        display: none;
    }
    
    .woocommerce-MyAccount-notifications tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
    }
    
    .woocommerce-MyAccount-notifications td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid #dee2e6;
    }
    
    .woocommerce-MyAccount-notifications td:last-child {
        border-bottom: none;
    }
    
    .woocommerce-MyAccount-notifications td:before {
        content: attr(data-title);
        float: left;
        font-weight: 600;
        color: #333;
    }
}

/* 無通知時的提示文字樣式 */
.woocommerce-MyAccount-notifications-empty {
    text-align: center;
    padding: 30px;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* 通知詳情頁面樣式 */
.notification-detail {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.notification-detail h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.notification-meta {
    margin-bottom: 25px;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 15px;
}

.notification-meta span {
    margin-right: 20px;
    display: inline-block;
}

.notification-content {
    line-height: 1.8;
    color: #444;
}

/* 返回按鈕樣式 */
.notification-detail .button {
    background-color: #3498db;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s ease;
    border: none;
    display: inline-block;
    margin-bottom: 20px;
}

.notification-detail .button:hover {
    background-color: #2980b9;
}

/* Wrapper 容器 */
.notifications-wrapper {
    position: relative;
    min-height: 200px; /* 確保有足夠空間顯示 loading */
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 分頁樣式 */
.pagination {
    margin: 20px 0;
    text-align: center;
}

.pagination ul {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination ul li {
    display: inline-block;
    margin: 0 4px;
}

.pagination .page-numbers {
    text-decoration: none;
    border-radius: 3px;
    color: #666;
    background: #fff;
    display: inline-block;
    min-width: 15px;
    text-align: center;
    padding: 5px 10px!important;
}

.pagination .page-numbers.current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pagination .page-numbers:hover:not(.current) {
    background: #f5f5f5;
    border-color: #999;
}

.pagination .prev,
.pagination .next {
    padding: 8px 15px;
}

.notification-single {
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* 標題樣式 */
.notification-single h2 {
    font-size: 1.5rem;
    color: #333333;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
}

/* 元數據區域 */
.notification-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #666666;
}

.notification-meta span {
    display: flex;
    align-items: center;
}

.notification-meta span::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    background-size: contain;
    background-repeat: no-repeat;
}

.notification-meta .date::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M19 4h-1V3c0-.55-.45-1-1-1s-1 .45-1 1v1H8V3c0-.55-.45-1-1-1s-1 .45-1 1v1H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z'/%3E%3C/svg%3E");
}

.notification-meta .type::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M12 2L2 7v10l10 5 10-5V7L12 2zm0 16.5L4 14v-6l8 4 8-4v6l-8 4.5z'/%3E%3C/svg%3E");
}

/* 內容區域 */
.notification-content {
    color: #444444;
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.notification-content p {
    margin: 0 0 1rem 0;
}

.notification-content a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.notification-content a:hover {
    color: #004c99;
    text-decoration: underline;
}

/* 返回按鈕 */
.notification-single .button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #4a90e2;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.notification-single .button:hover {
    background-color: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .notification-single {
        padding: 1.5rem;
    }

    .notification-single h2 {
        font-size: 1.25rem;
    }

    .notification-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .notification-content {
        padding: 0.75rem;
    }
}