/**
 * 自定义样式 - 校园外卖主题
 *
 * @package Campus_Delivery
 */

/* ==========================================================================
   分页样式
   ========================================================================== */

.pagination {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.pagination ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination .active {
    display: block;
    padding: 0.75rem 1.25rem;
    background: #fff;
    color: #2C3E50;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .active {
    background: #FF6B35;
    color: #fff;
    border-color: #FF6B35;
    transform: translateY(-2px);
}

.pagination .active {
    cursor: default;
}

/* ==========================================================================
   客服浮窗样式
   ========================================================================== */

.customer-service-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.service-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FF6B35, #F7931E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.service-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.service-icon {
    font-size: 1.8rem;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 53, 0.6);
    }
}

.service-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    display: none;
    animation: slideUp 0.3s ease;
}

.service-panel.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E0E0E0;
}

.service-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #2C3E50;
}

.service-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7F8C8D;
    transition: all 0.3s ease;
}

.service-close:hover {
    color: #FF6B35;
    transform: rotate(90deg);
}

.service-content {
    padding: 1.5rem;
}

.service-item {
    margin-bottom: 1rem;
}

.service-item:last-child {
    margin-bottom: 0;
}

.service-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #2C3E50;
}

.service-item a {
    color: #FF6B35;
    text-decoration: underline;
}

.service-item img {
    width: 100%;
    max-width: 150px;
    border-radius: 8px;
    margin: 0 auto;
}

/* ==========================================================================
   面包屑导航
   ========================================================================== */

.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #7F8C8D;
}

.breadcrumb a {
    color: #FF6B35;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    color: #F7931E;
}

/* ==========================================================================
   评论区样式
   ========================================================================== */

.comments-area {
    margin-top: 3rem;
    padding: 2rem;
    background: #F8F9FA;
    border-radius: 15px;
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2C3E50;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.comment-author {
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.85rem;
    color: #7F8C8D;
    margin-bottom: 1rem;
}

.comment-content p {
    margin: 0;
    line-height: 1.6;
}

.comment-reply-link {
    font-size: 0.9rem;
    color: #FF6B35;
    margin-top: 0.5rem;
    display: inline-block;
}

.comment-respond {
    margin-top: 2rem;
}

.comment-form {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #FF6B35;
}

.comment-form textarea {
    resize: vertical;
    min-height: 150px;
}

.comment-form input[type="submit"] {
    background: #FF6B35;
    color: #fff;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background: #F7931E;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

/* ==========================================================================
   侧边栏小工具样式
   ========================================================================== */

.widget-area {
    background: #F8F9FA;
    padding: 1.5rem;
    border-radius: 15px;
}

.widget {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #2C3E50;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #FF6B35;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #F8F9FA;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: #2C3E50;
    transition: all 0.3s ease;
}

.widget a:hover {
    color: #FF6B35;
    padding-left: 5px;
}

/* ==========================================================================
   搜索表单
   ========================================================================== */

.search-form {
    position: relative;
    display: flex;
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-form input[type="search"]:focus {
    border-color: #FF6B35;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background: #FF6B35;
    color: #fff;
    border: none;
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.search-form button:hover {
    background: #F7931E;
}

/* ==========================================================================
   响应式调整
   ========================================================================== */

@media (max-width: 768px) {
    .customer-service-float {
        bottom: 20px;
        right: 20px;
    }

    .service-toggle {
        width: 50px;
        height: 50px;
    }

    .service-icon {
        font-size: 1.5rem;
    }

    .service-panel {
        width: calc(100vw - 40px);
        right: -10px;
    }

    .widget-area {
        margin-top: 2rem;
    }
}

/* ==========================================================================
   加载动画
   ========================================================================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 107, 53, 0.3);
    border-radius: 50%;
    border-top-color: #FF6B35;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   辅助类
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
