/* 基础样式 */
.wp-event-calendar {
    max-width: 1000px;
    margin: 15px auto;
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    line-height: 1.4;
}

/* 日历头部 */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.calendar-title {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.calendar-controls {
    display: flex;
    gap: 8px;
}

.calendar-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.calendar-btn:hover {
    background-color: #2980b9;
    color: white;
    transform: translateY(-1px);
}

.calendar-btn.today-btn {
    background-color: #2ecc71;
}

.calendar-btn.today-btn:hover {
    background-color: #27ae60;
}

/* 日历网格 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    background-color: #fff;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

.calendar-day:hover {
    box-shadow: 0 3px 5px rgba(0,0,0,0.07);
}

.calendar-day.header {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: center;
    min-height: auto;
    padding: 8px;
    color: #7f8c8d;
    border-color: #e9ecef;
}

.calendar-day.empty {
    background-color: #fafafa;
    border: 1px solid #f1f1f1;
}

.day-number {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.95rem;
    display: inline-block;
}

.calendar-day.today .day-number {
    background-color: #3498db;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    font-size: 0.9rem;
}

/* 添加事件按钮 */
.add-event-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    text-align: center;
}

.add-event-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
}

/* 事件样式 */
.events {
    margin-top: 5px;
    font-size: 0.75rem;
    overflow: hidden;
}

.event-type-label {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #7f8c8d;
    letter-spacing: 0.3px;
}

.public-events .event-type-label {
    color: #3498db;
}

.private-events .event-type-label {
    color: #e74c3c;
}

.event {
    padding: 4px;
    margin-bottom: 4px;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.event:hover {
    transform: translateX(2px);
}

.public-event {
    background-color: #ebf5fb;
    border-left: 2px solid #3498db;
}

.private-event {
    background-color: #fdedeb;
    border-left: 2px solid #e74c3c;
}

.event-title {
    font-weight: 600;
    margin-bottom: 1px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.public-event .event-title {
    color: #2980b9;
}

.private-event .event-title {
    color: #c0392b;
}

.event-description {
    color: #666;
    font-size: 0.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-actions {
    display: none;
    position: absolute;
    top: 2px;
    right: 2px;
}

.event:hover .event-actions {
    display: flex;
    gap: 2px;
}

.edit-event, .delete-event {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.65rem;
    padding: 0 2px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.edit-event:hover, .delete-event:hover {
    opacity: 1;
}

.edit-event {
    color: #3498db;
}

.delete-event {
    color: #e74c3c;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #e74c3c;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.required {
    color: #e74c3c;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 7px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #f1f1f1;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e5e5e5;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-1px);
}

/* 详情模态框样式 */
#detail-title {
    margin-top: 0;
    color: #2c3e50;
}

.detail-meta {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.public-type {
    color: #3498db;
}

.private-type {
    color: #e74c3c;
}

#detail-description {
    margin: 15px 0;
    line-height: 1.6;
    color: #555;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* 公示栏样式 */
.information-board {
    margin-top: 25px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.information-board h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-section h4 {
    margin-bottom: 8px;
    color: #34495e;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-section ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9rem;
    color: #555;
}

.info-section li {
    margin-bottom: 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .wp-event-calendar {
        padding: 10px 5px;
        margin: 10px auto;
    }
    
    .calendar-title {
        font-size: 1.2rem;
    }
    
    .calendar-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 5px;
        font-size: 0.8rem;
    }
    
    .add-event-btn {
        padding: 3px 5px;
        font-size: 0.7rem;
        margin-bottom: 5px;
    }
    
    .event-title {
        font-size: 0.7rem;
    }
    
    .event-description {
        font-size: 0.65rem;
        -webkit-line-clamp: 1;
    }
    
    .modal-content {
        margin: 15% auto 10%;
        padding: 15px;
    }
    
    .info-sections {
        grid-template-columns: 1fr;
    }
    
    /* 小屏幕优化 - 隐藏部分内容以节省空间 */
    @media (max-width: 480px) {
        .calendar-day {
            min-height: 70px;
        }
        
        .event-type-label {
            display: none;
        }
        
        .calendar-controls {
            flex-wrap: wrap;
        }
    }
}

/* 移动端交互优化 */
.mobile-interactive {
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}
