/* Calendar Wrapper */
.wdpc-calendar-wrapper {
    font-family: inherit;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
    /* Ensure container is full width */
}

/* Force border-box everywhere inside */
.wdpc-calendar-wrapper * {
    box-sizing: border-box;
}

/* Header */
.wdpc-header {
    display: flex;
    justify_content: space-between;
    align-items: center;
    padding: 10px;
    background: #f5f5f5;
    margin-bottom: 10px;
    border-radius: 4px;
}

.wdpc-title {
    font-size: 1.2em;
    font-weight: bold;
}

.wdpc-nav {
    background: none;
    border: 1px solid #ccc;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.2s;
}

.wdpc-nav:hover {
    background: #e0e0e0;
}

/* Grid System */
.wdpc-body {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    width: 100%;
}

.wdpc-week-header,
.wdpc-week-row {
    display: grid;
    /* Use minmax(0, 1fr) to force equal width ignoring content */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
}

.wdpc-day-name {
    padding: 5px;
    /* Reduced padding for better fit in widgets */
    text-align: center;
    background: #fafafa;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #eee;
    /* Match body border */
    font-weight: bold;
    font-size: 0.9em;
}

.wdpc-day-name:nth-child(7n) {
    border-right: none;
}

/* Days */
.wdpc-day {
    min-height: 80px;
    /* Adjust for Wide Mode */
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 5px;
    position: relative;
    background: #fff;
}

.wdpc-day:nth-child(7n) {
    border-right: none;
}

.wdpc-day.wdpc-empty {
    background: #fcfcfc;
}

.wdpc-date-num {
    display: block;
    font-size: 0.85em;
    color: #888;
    margin-bottom: 5px;
    text-align: right;
}

/* Narrow Mode Overrides */
.wdpc-mode-narrow .wdpc-day {
    min-height: 40px;
    /* Smaller cells */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.wdpc-mode-narrow .wdpc-date-num {
    text-align: center;
    margin-bottom: 2px;
}

/* Posts Container */
.wdpc-posts-container {
    font-size: 0.85em;
    line-height: 1.3;
}

/* Post Links (Wide Mode) */
.wdpc-post-link {
    display: block;
    margin-bottom: 2px;
    text-decoration: none;
    color: var(--wdpc-primary-color, #0073aa);
    overflow: hidden;
    text-overflow: ellipsis;
    /* Multiline truncation will be handled by settings/class */
    white-space: nowrap;
}

/* More Indicator */
.wdpc-more {
    font-size: 0.8em;
    color: #999;
    text-align: center;
    margin-top: 2px;
}

/* Narrow Mode Dot */
.wdpc-dot {
    display: block;
    width: 6px;
    height: 6px;
    background-color: var(--wdpc-dot-color, #ff4400);
    border-radius: 50%;
    margin-top: 2px;
}