/**
 * Day Wise Archive Plugin - Modern Light/Transparent Design
 */

:root {
    --dwa-primary: #2563eb;
    --dwa-primary-dark: #1e40af;
    --dwa-primary-light: #60a5fa;
    --dwa-secondary: #f59e0b;
    --dwa-bg-light: #ffffff;
    --dwa-bg-lighter: #f8fafc;
    --dwa-border: #e2e8f0;
    --dwa-text-dark: #1e293b;
    --dwa-text-light: #64748b;
    --dwa-success: #10b981;
    --dwa-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.05);
    --dwa-card-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Light Theme (Default) */
.dwa-container.dwa-theme-light {
    --dwa-bg-light: #ffffff;
    --dwa-bg-lighter: #f8fafc;
    --dwa-border: #e2e8f0;
    --dwa-text-dark: #1e293b;
    --dwa-text-light: #64748b;
}

/* Dark Theme */
.dwa-container.dwa-theme-dark {
    --dwa-bg-light: #1e293b;
    --dwa-bg-lighter: #0f172a;
    --dwa-border: #334155;
    --dwa-text-dark: #f1f5f9;
    --dwa-text-light: #cbd5e1;
    --dwa-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
    --dwa-card-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Auto Theme - Based on system preference */
@media (prefers-color-scheme: dark) {
    .dwa-container.dwa-theme-auto {
        --dwa-bg-light: #1e293b;
        --dwa-bg-lighter: #0f172a;
        --dwa-border: #334155;
        --dwa-text-dark: #f1f5f9;
        --dwa-text-light: #cbd5e1;
        --dwa-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
        --dwa-card-shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
    }
}

.dwa-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: transparent;
}

/* Day Section Styling - Light Transparent Card Design */
.dwa-day-section {
    margin-bottom: 2rem;
    background: var(--dwa-bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--dwa-card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--dwa-border);
    backdrop-filter: blur(10px);
    background: rgba(var(--dwa-bg-light-rgb, 255, 255, 255), 0.9);
}

.dwa-container.dwa-theme-light .dwa-day-section {
    background: rgba(255, 255, 255, 0.9);
}

.dwa-container.dwa-theme-dark .dwa-day-section,
.dwa-container.dwa-theme-auto .dwa-day-section {
    background: rgba(30, 41, 59, 0.9);
}

.dwa-day-section:hover {
    box-shadow: var(--dwa-card-shadow-hover);
    transform: translateY(-4px);
}

.dwa-container.dwa-theme-light .dwa-day-section:hover {
    background: rgba(255, 255, 255, 0.95);
}

.dwa-container.dwa-theme-dark .dwa-day-section:hover,
.dwa-container.dwa-theme-auto .dwa-day-section:hover {
    background: rgba(30, 41, 59, 0.95);
}

/* Day Header - Light Theme */
.dwa-day-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dwa-day-header:hover {
    opacity: 0.95;
}

.dwa-day-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.dwa-day-name {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.dwa-day-title {
    margin: 0;
    font-size: 1.35rem;
    color: white;
    flex: 1;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.dwa-post-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.dwa-post-count::before {
    content: '📝';
    font-size: 0.9rem;
    margin-right: 5px;
}

/* Posts List - Light Theme */
.dwa-posts-list {
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(var(--dwa-bg-lighter-rgb, 248, 250, 252), 0.7);
}

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

.dwa-post-item {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid rgba(var(--dwa-border-rgb, 226, 232, 240), 0.6);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: rgba(var(--dwa-bg-light-rgb, 255, 255, 255), 0.5);
}

.dwa-post-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--dwa-primary) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dwa-post-item:last-child {
    border-bottom: none;
}

.dwa-post-item:hover {
    background: rgba(var(--dwa-bg-lighter-rgb, 248, 250, 252), 0.8);
    padding-left: 2.25rem;
}

.dwa-post-item:hover::before {
    opacity: 1;
}

/* Post Thumbnail */
.dwa-post-thumbnail {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    max-width: 150px;
    height: auto;
}

.dwa-post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    border-radius: 6px;
}

.dwa-post-item:hover .dwa-post-thumbnail img {
    transform: scale(1.05);
}

/* Post Title - Light Theme */
.dwa-post-title {
    display: inline-block;
    color: var(--dwa-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    word-break: break-word;
    line-height: 1.4;
    margin-bottom: 5px;
}

.dwa-post-title:hover {
    color: var(--dwa-primary-dark);
    text-decoration: none;
    margin-left: 4px;
}

.dwa-post-title:focus {
    outline: 2px solid var(--dwa-primary);
    outline-offset: 2px;
}

/* Post Meta - Light Theme */
.dwa-post-meta {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--dwa-text-light);
    flex-wrap: wrap;
    align-items: center;
}

.dwa-post-date::before {
    content: '📅 ';
    margin-right: 0.25rem;
    opacity: 0.7;
}

.dwa-post-author::before {
    content: '👤 ';
    margin-right: 0.25rem;
    opacity: 0.7;
}

.dwa-post-date,
.dwa-post-author {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.dwa-post-author a {
    color: var(--dwa-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dwa-post-author a:hover {
    color: var(--dwa-primary-dark);
    text-decoration: underline;
}

.dwa-post-author a:focus {
    outline: 2px solid var(--dwa-primary);
    outline-offset: 2px;
}

/* Post Excerpt - Light Card */
.dwa-post-excerpt {
    margin-top: 1rem;
    padding: 1rem;
    color: var(--dwa-text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    background: rgba(var(--dwa-bg-lighter-rgb, 241, 245, 249), 0.7);
    border-left: 3px solid var(--dwa-primary-light);
    border-radius: 6px;
    font-style: normal;
    backdrop-filter: blur(5px);
}

/* Error and Info Messages - Light Design */
.dwa-error,
.dwa-no-posts {
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.dwa-error {
    background: linear-gradient(135deg, rgba(254, 226, 226, 0.9) 0%, rgba(254, 202, 202, 0.9) 100%);
    color: #991b1b;
    border-color: rgba(252, 165, 165, 0.5);
}

.dwa-error::before {
    content: '⚠️';
    font-size: 1.5rem;
    flex-shrink: 0;
}

.dwa-no-posts {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.9) 0%, rgba(191, 219, 254, 0.9) 100%);
    color: var(--dwa-text-dark);
    border-color: rgba(125, 211, 252, 0.5);
    justify-content: center;
    text-align: center;
    backdrop-filter: blur(10px);
}

.dwa-no-posts::before {
    content: '📭';
    font-size: 2rem;
    flex-shrink: 0;
}

/* Footer Credit - Light Transparent Design */
.dwa-footer-credit {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: rgba(var(--dwa-bg-light-rgb, 255, 255, 255), 0.9);
    border-top: 1px solid rgba(var(--dwa-border-rgb, 226, 232, 240), 0.8);
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--dwa-border-rgb, 226, 232, 240), 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.dwa-footer-credit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dwa-primary-light), transparent);
    opacity: 0.5;
}

.dwa-footer-credit::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(96, 165, 250, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.dwa-footer-credit-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.dwa-footer-credit-main {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(var(--dwa-border-rgb, 226, 232, 240), 0.5);
}

.dwa-footer-credit-text {
    color: var(--dwa-text-dark);
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
    font-weight: 400;
}

.dwa-footer-credit-text strong {
    color: var(--dwa-primary);
    font-weight: 700;
}

.dwa-footer-credit-text a {
    color: var(--dwa-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    padding: 0 2px;
}

.dwa-footer-credit-text a:hover {
    color: var(--dwa-primary-dark);
}

.dwa-footer-credit-text a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--dwa-primary);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.dwa-footer-credit-text a:hover::after {
    width: 100%;
}

/* Social Links Section - Light Theme */
.dwa-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.dwa-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 8px;
    color: var(--dwa-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.dwa-social-link:hover {
    background: var(--dwa-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(96, 165, 250, 0.3);
    border-color: var(--dwa-primary);
}

.dwa-social-link svg {
    width: 20px;
    height: 20px;
}

.dwa-footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(var(--dwa-border-rgb, 226, 232, 240), 0.5);
    color: var(--dwa-text-light);
    font-size: 0.85rem;
    font-weight: 400;
}

/* Collapse Animation - Light Theme */
.dwa-day-section.collapsed .dwa-day-header::after {
    content: '▼';
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.dwa-day-section:not(.collapsed) .dwa-day-header::after {
    content: '▲';
    margin-left: auto;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

/* Control Buttons - Light Theme */
.dwa-controls {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(var(--dwa-bg-light-rgb, 255, 255, 255), 0.9);
    border-radius: 12px;
    border: 1px solid rgba(var(--dwa-border-rgb, 226, 232, 240), 0.8);
    backdrop-filter: blur(10px);
    box-shadow: var(--dwa-card-shadow);
}

.dwa-expand-all,
.dwa-collapse-all {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dwa-expand-all {
    background: var(--dwa-primary);
    color: white;
}

.dwa-expand-all:hover {
    background: var(--dwa-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.dwa-collapse-all {
    background: rgba(var(--dwa-bg-lighter-rgb, 248, 250, 252), 0.8);
    color: var(--dwa-primary);
    border-color: var(--dwa-primary);
}

.dwa-collapse-all:hover {
    background: rgba(219, 234, 254, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dwa-day-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .dwa-day-header::before {
        display: none;
    }

    .dwa-day-name {
        width: 48px;
        height: 48px;
        font-size: 0.75rem;
    }

    .dwa-day-title {
        font-size: 1.15rem;
    }

    .dwa-post-count {
        align-self: flex-start;
    }

    .dwa-post-item {
        padding: 1rem 1.5rem;
    }

    .dwa-post-item:hover {
        padding-left: 1.75rem;
    }

    .dwa-post-title {
        font-size: 1rem;
    }

    .dwa-post-meta {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .dwa-day-section {
        margin-bottom: 1.5rem;
    }

    .dwa-footer-credit {
        padding: 2rem 1.5rem;
        margin-top: 3rem;
    }

    .dwa-social-links {
        gap: 0.75rem;
    }

    .dwa-social-link {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dwa-container {
        margin: 0;
    }

    .dwa-day-section {
        border-radius: 8px;
        margin-bottom: 1rem;
    }

    .dwa-day-header {
        padding: 1rem;
    }

    .dwa-post-item {
        padding: 0.75rem 1rem;
    }

    .dwa-post-item:hover {
        padding-left: 1.25rem;
    }

    .dwa-post-title {
        font-size: 0.95rem;
    }

    .dwa-post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .dwa-footer-credit {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }

    .dwa-social-links {
        gap: 0.5rem;
    }

    .dwa-footer-credit-text {
        font-size: 0.9rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dwa-day-section {
    animation: fadeInUp 0.4s ease;
}

/* Loading State */
.dwa-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.dwa-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(226, 232, 240, 0.3);
    border-top-color: var(--dwa-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Print Styles */
@media print {
    .dwa-day-header {
        background: white !important;
        color: var(--dwa-text-dark);
        border-bottom: 2px solid var(--dwa-primary);
    }

    .dwa-day-section {
        box-shadow: none;
        page-break-inside: avoid;
        background: white;
    }

    .dwa-post-item:hover {
        background: white;
    }

    .dwa-footer-credit {
        background: white;
        color: var(--dwa-text-dark);
        border-top: 2px solid var(--dwa-primary);
    }

    .dwa-post-title {
        color: var(--dwa-text-dark);
        text-decoration: underline;
    }
}