/* WAW Codes Main Styles */
.waw-codes-wrapper {
    font-family: Arial, sans-serif;
    margin: 20px 0;
}

.waw-codes-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.waw-codes-filters input,
.waw-codes-filters select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
}

.waw-codes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.waw-code-card {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: opacity 0.3s, border-color 0.5s;
    align-items: center;
    scroll-margin-top: 100px; /* Offset for jumping from calendar */
}
.waw-code-card:target {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.waw-code-card.is-inactive {
    opacity: 0.6;
    background: #fdfdfd;
}

.waw-code-card.is-claimed {
    opacity: 0.5;
    background: #f5f5f5;
}

@media (max-width: 768px) {
    .waw-code-card {
        flex-direction: column;
        align-items: stretch;
    }
}

.waw-code-thumb {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
}

.waw-code-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .waw-code-thumb {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
}

.waw-code-details {
    padding: 15px;
    flex-grow: 1;
}

.waw-code-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.waw-code-game {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-weight: bold;
    color: #444;
    font-size: 18px;
}

.waw-code-game-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.waw-code-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.waw-code-meta span {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
}

.waw-code-days-left {
    color: #008a00 !important;
    background: #e6f9e6 !important;
}

.waw-code-card.is-inactive .waw-code-days-left,
.waw-code-card.is-inactive .waw-code-meta span {
    background: #e0e0e0 !important;
    color: #666 !important;
}

.waw-code-rewards {
    background: #f9f9fe;
    border-left: 3px solid #6c5ce7;
    padding: 8px 12px;
    font-size: 14px;
    margin-bottom: 8px;
}

.waw-code-info {
    color: #777;
}

.waw-code-actions-wrapper {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-left: 1px solid #eee;
    background: #fafafa;
}

@media (max-width: 768px) {
    .waw-code-actions-wrapper {
        flex-direction: column;
        border-left: none;
        border-top: 1px solid #eee;
    }
}

.waw-code-promo-img {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px dashed #ddd;
}
.waw-code-promo-img img {
    max-width: 150px;
    max-height: 120px;
    object-fit: contain;
}

.waw-code-actions {
    padding: 15px;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    border-left: none;
    background: transparent;
    align-self: center; /* keep it centered vertically */
}

@media (max-width: 768px) {
    .waw-code-actions {
        border-top: none;
    }
}

.waw-code-string-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.waw-code-input {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    border: 2px dashed #ccc;
    background: #fff;
    color: #d63031;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    text-overflow: ellipsis;
    overflow: hidden;
}

.waw-code-copy-btn {
    background: #0984e3;
    color: #fff;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s;
}

.waw-code-copy-btn:hover {
    background: #074b83;
}

.waw-code-claim-box {
    text-align: center;
    margin-top: 10px;
}

.waw-code-claim-checkbox {
    transform: scale(1.2);
    margin-right: 5px;
}

.waw-codes-pagination {
    margin-top: 20px;
    display: flex;
    gap: 5px;
    justify-content: center;
}

.waw-codes-pagination a,
.waw-codes-pagination span {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.waw-codes-pagination .current {
    background: #6c5ce7;
    color: #fff;
    border-color: #6c5ce7;
}

/* Short Sidebar Widget Styles */
.waw-codes-sidebar-widget {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.waw-codes-short-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    border-bottom: 2px solid #6c5ce7;
    padding-bottom: 5px;
}

.waw-codes-short-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.waw-code-short-item {
    background: #f9f9f9;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ebebeb;
}

.waw-code-short-item.is-claimed {
    opacity: 0.5;
}

.waw-code-short-game {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}

.waw-code-short-string {
    font-family: monospace;
    font-weight: bold;
    font-size: 14px;
    color: #d63031;
    word-break: break-all;
}

.waw-code-short-time {
    font-size: 11px;
    color: #00b894;
}

.waw-code-short-checkbox {
    margin-top: 6px;
    font-size: 11px;
}

.waw-code-short-checkbox input {
    margin-right: 4px;
}

.waw-codes-short-more {
    display: block;
    text-align: center;
    margin-top: 15px;
    background: #eee;
    padding: 8px;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

.waw-codes-short-more:hover {
    background: #ddd;
}

/* Calendar Styles */
.waw-codes-calendar-widget {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.waw-codes-calendar-title {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
}
.waw-codes-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.waw-codes-calendar-cell {
    border: 1px solid #eee;
    border-radius: 4px;
    min-height: 60px;
    padding: 5px;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
}
.waw-codes-calendar-cell.header {
    background: transparent;
    border: none;
    min-height: auto;
    text-align: center;
    font-weight: bold;
    color: #666;
    padding: 5px 0;
}
.waw-codes-calendar-cell.empty {
    background: transparent;
    border: dashed 1px #eee;
}
.waw-codes-calendar-cell.is-today {
    background: #eef2ff !important;
    border-color: #a5b4fc !important;
}
.waw-codes-calendar-day-number {
    font-weight: bold;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}
.waw-codes-calendar-cell.is-today .waw-codes-calendar-day-number {
    color: #4f46e5;
}
.waw-codes-calendar-events {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: flex-start;
}
.waw-codes-calendar-event {
    width: 25px;
    height: 25px;
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.waw-codes-calendar-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.waw-codes-calendar-event img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.waw-codes-calendar-event.text-only {
    font-size: 9px;
    color: #555;
    background: #f0f0f0;
    line-height: 1;
    overflow: hidden;
}
.waw-codes-calendar-legend {
    margin-top: 15px;
    font-size: 11px;
    color: #888;
    text-align: center;
}
@media (max-width: 600px) {
    .waw-codes-calendar-cell {
        min-height: 45px;
        padding: 2px;
    }
    .waw-codes-calendar-event {
        width: 16px;
        height: 16px;
    }
}