/**
 * Deutsch Content Enhancer Frontend Styles - Modern UI 2.0
 */

/* CSS Variables for Customization */
:root {
    /* Primary colors */
    --dce-primary-color: #4361ee;
    --dce-primary-hover: #3a56d4;
    --dce-primary-light: rgba(67, 97, 238, 0.1);
    
    /* Secondary colors */
    --dce-secondary-color: #6c757d;
    --dce-secondary-hover: #5a6268;
    --dce-secondary-light: rgba(108, 117, 125, 0.1);
    
    /* Status colors */
    --dce-success-color: #06d6a0;
    --dce-success-hover: #05c091;
    --dce-success-light: rgba(6, 214, 160, 0.1);
    
    --dce-warning-color: #ffd166;
    --dce-warning-hover: #ffc233;
    --dce-warning-light: rgba(255, 209, 102, 0.1);
    
    --dce-danger-color: #ef476f;
    --dce-danger-hover: #e62e5c;
    --dce-danger-light: rgba(239, 71, 111, 0.1);
    
    --dce-info-color: #118ab2;
    --dce-info-hover: #0f7a9d;
    --dce-info-light: rgba(17, 138, 178, 0.1);
    
    /* Basic colors */
    --dce-text-color: #212529;
    --dce-text-muted: #6c757d;
    --dce-background-color: #f8f9fa;
    --dce-border-color: #dee2e6;
    
    /* Card styling */
    --dce-card-border-radius: 12px;
    --dce-card-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.06);
    --dce-card-hover-box-shadow: 0 10px 15px rgba(0, 0, 0, 0.04), 0 4px 6px rgba(0, 0, 0, 0.06);
    
    /* Header styling */
    --dce-header-background-color: #ffffff;
    --dce-header-text-color: #212529;
    
    /* Button styling */
    --dce-button-background-color: var(--dce-primary-color);
    --dce-button-text-color: #ffffff;
    --dce-button-hover-background-color: var(--dce-primary-hover);
    --dce-button-hover-text-color: #ffffff;
    --dce-button-border-radius: 6px;
    --dce-button-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    --dce-button-hover-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Price styling */
    --dce-price-color: var(--dce-primary-color);
    --dce-price-old-color: var(--dce-danger-color);
    
    /* Featured badge styling */
    --dce-featured-badge-color: var(--dce-warning-color);
    --dce-featured-badge-text: #212529;
    
    /* Image styling */
    --dce-image-height: 300px;
    --dce-image-border-radius: var(--dce-card-border-radius) var(--dce-card-border-radius) 0 0;
    
    /* Spacing */
    --dce-spacing-xs: 4px;
    --dce-spacing-sm: 8px;
    --dce-spacing-md: 16px;
    --dce-spacing-lg: 24px;
    --dce-spacing-xl: 32px;
    
    /* Transitions */
    --dce-transition-fast: all 0.2s ease;
    --dce-transition: all 0.25s ease;
    
    /* Responsive breakpoints */
    --dce-breakpoint-small: 768px;
    --dce-breakpoint-medium: 1024px;
    --dce-breakpoint-large: 1280px;
}

/* Container */
body .dce-offers-container {
    width: 100%;
    max-width: 100%;
}

/* Filters */
.dce-filters {
    margin-bottom: var(--dce-spacing-xl);
    display: flex;
    background-color: #fff;
    padding: var(--dce-spacing-md);
    border-radius: var(--dce-card-border-radius);
    box-shadow: var(--dce-card-box-shadow);
    align-items: flex-start;
    flex-direction: column;
    position: relative;
}

/* Filter categories container */
.dce-filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
}

/* Filter button styles */
body .dce-filter-button, body button.dce-filter-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: var(--dce-background-color);
    border: 1px solid var(--dce-border-color);
    border-radius: var(--dce-button-border-radius);
    color: var(--dce-text-color);
    font-size: 14px;
    cursor: pointer;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: auto;
}

/* Hover state */
body .dce-filter-button:hover, body button.dce-filter-button:hover {
    background-color: var(--dce-secondary-color);
    border-color: var(--dce-secondary-color);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Active state */
body .dce-filter-button.active {
    background-color: var(--dce-button-background-color, #2271b1);
    border-color: var(--dce-button-background-color, #2271b1);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Category count styles */
.dce-filter-button .dce-category-count {
    display: inline-block;
    font-size: 0.85em;
    color: rgba(255,255,255,0.8);
    margin-left: 5px;
    font-weight: normal;
    transition: color 0.2s ease;
    opacity: 0.9;
}

/* Non-active category count */
.dce-filter-button:not(.active) .dce-category-count {
    color: #777;
    background-color: rgba(0,0,0,0.05);
    border-radius: 10px;
    padding: 0 6px;
}

/* Hover and active state for category count */
body .dce-filter-button:hover .dce-category-count,
body .dce-filter-button.active .dce-category-count {
    color: inherit;
    opacity: 1;
}

/* Sort Dropdown Styles */
.dce-filter-sort {
    display: flex;
    align-items: center;
    gap: var(--dce-spacing-sm, 8px);
    margin-top: var(--dce-spacing-sm, 8px);
}

.dce-filter-sort label {
    font-weight: 500;
    color: var(--dce-text-color, #333);
    white-space: nowrap;
}

.dce-sort-select {
    padding: 8px 12px;
    border-radius: var(--dce-button-border-radius, 4px);
    border: 1px solid var(--dce-border-color, #ddd);
    background-color: #fff;
    color: var(--dce-text-color, #333);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 200px;
}

.dce-sort-select:focus {
    outline: none;
    border-color: var(--dce-primary-color, #007bff);
    box-shadow: 0 0 0 3px var(--dce-primary-light, rgba(0, 123, 255, 0.25));
}

.dce-sort-select:hover {
    border-color: var(--dce-secondary-color, #6c757d);
}

/* Search Box Styles */
.dce-filter-search {
    margin-bottom: var(--dce-spacing-md);
    width: 75%;
}

.dce-filter-search label {
    margin-right: 5px;
    display: inline-block;
    background: #ffffff;
    padding: 0 4px;
    color: #8f8585;
    top: 10px;
    position: relative;
    left: 7px;
    font-size: small;
    z-index: 1;
}

.dce-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.dce-search-input {
    width: 100% !important;
    padding: 10px 40px 10px 16px !important;
    border-radius: var(--dce-button-border-radius) !important;
    border: 1px solid var(--dce-border-color) !important;
    background-color: #fff !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.dce-search-input:focus {
    outline: none;
    border-color: var(--dce-primary-color);
    box-shadow: 0 0 0 3px var(--dce-primary-light);
}

.dce-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dce-secondary-color);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.dce-search-clear:hover {
    background-color: var(--dce-secondary-light);
    color: var(--dce-secondary-hover);
}

.dce-no-results {
    padding: var(--dce-spacing-lg);
    text-align: center;
    background-color: var(--dce-background-color);
    border-radius: var(--dce-card-border-radius);
    margin: var(--dce-spacing-md) 0;
    color: var(--dce-text-muted);
    font-style: italic;
}
/* Offers List */
.dce-offers-list.dce-layout-raster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 10px;
}
.dce-offer-image{
    max-height: 160px;
    height: 100%;

  width: 100%;
  object-fit: cover;    
  border-radius: 5px;
  padding: auto;

}
.dce-offer.dce-layout-raster {
    display: flex;
    flex-direction: column;
}
.dce-offer-act {
    background-color: var(--dce-button-background-color);
    color: #ffffff;
    padding: 2px 10px;
    border-radius: 5px;
    display: inline-block;
}
.dce-offer-featured-badge{
  display: inline-block;
  background-color: gold;
  color: #333;
  padding: 2px 10px;
  border-radius: 5px;
}
.dce-layout-raster .dce-offer {
    display: grid;
    gap: 20px;
 

}
/* Offer Card */
body .dce-offer {
    display: flex;
    flex-direction: row;
    background: #fff;
    border-radius: var(--dce-card-border-radius);
    border: 1px solid var(--dce-border-color);
    overflow: visible; /* Allow elements to be outside the container */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    margin-bottom: 20px;
    position: relative;
}

.dce-offer:hover {
    transform: translateY(-3px);
    box-shadow: var(--dce-card-hover-box-shadow);
}

.dce-offer-header {
    flex: 1;
    min-width: 150px;
    background: #ffffff;
    padding: 20px;
    border-right: 1px solid #eee;
    position: relative;
    border-radius: var(--dce-card-border-radius) var(--dce-card-border-radius) 0 0;
}

/* Modern styled expiry date in header - positioned on edge */
.dce-expiry-header {
    position: absolute;
    top: -20px;
    left: 16px;
    display: inline-block;
    background: #fafafa;
    color: black !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 2px 18px;
    border-radius: 28px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    transform-origin: left center;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #dadee1;
}
.dce-expiry-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    z-index: -1;
    animation: expiry-shine 2s infinite;
}

.dce-expiry-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent #005870 transparent;
    z-index: -2;
}

.dce-expiry-header .validity-label {
    opacity: 0.85;
    font-size: 10px;
    display: block;
    font-weight: 700;
}

.dce-expiry-header .validity-date {
    font-size: 13px;
    font-weight: 800;
    display: block;
    letter-spacing: 0.7px;
}

.dce-expiry-header:hover {
    transform: translateX(5px) scale(1.03);
    box-shadow: 0 6px 15px rgba(0, 131, 176, 0.4);
}

.animated-expiry {
    animation: fadeInLeft 0.6s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dce-offer-title {
    margin: 0 0 var(--dce-spacing-sm);
    font-size: 18px;
    font-weight: 600;
    color: var(--dce-header-text-color);
    line-height: 1.3;
}

.dce-offer-provider {
    font-size: 14px;
    color: var(--dce-text-muted);
    display: flex;
    align-items: center;
    gap: var(--dce-spacing-xs);
}

.dce-offer-provider-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
}

body .dce-offer-content {
    flex: 2;
    padding: 15px 20px;
    overflow: hidden;
    position: relative;
}

.dce-offer-image {
    border-radius: calc(var(--dce-card-border-radius) / 2);
    overflow: hidden;
    display: block;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 0.95rem;
}

.dce-offer-image img {
display: block !important;
  width: inherit !important;
  height: inherit !important;
  max-height: var(--dce-image-height);
  object-fit: contain !important;
  object-position: center !important;
  }

.dce-offer-description {
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dce-description-truncated {
    max-height: 153px;}

.dce-description-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

.dce-description-expanded .dce-description-gradient {
    opacity: 0;
}

body button.dce-read-more-button:focus, 
body .dce-read-more-button:focus {
    outline: none;
    box-shadow: 0 0 0 0 var(--dce-primary-color);
}

hr.dce-price-suffix {
    margin: 17px 0px !important;
}

.dce-feature-hidden {
    display: none;
}

.dce-feature-list.dce-expanded .dce-feature-hidden {
    display: list-item;
}

@keyframes button-shimmer {
    100% {
        transform: translateX(100%);
    }
}

.dce-offer-details {
margin: 15px 0;
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); */
    gap: 15px;
    margin-bottom: 5px;
}

.dce-price-label,
.dce-duration-label,
.dce-network-label,
.dce-fees-label {
    display: block;
    font-size: 12px;
    color: #646970;
    margin-bottom: 5px;
}

.dce-price-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--dce-price-color);
}

.dce-price-suffix,
.dce-fee-suffix {
    font-size: 14px;
    color: #646970;
}

.dce-offer-footer {
    flex: 1;
    background: #fefefe;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid #eee;
}

.count-box {
    background: #f6f6f6;
    color: #000000;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    width: 60px;
    display: grid;
}

.label {
    font-size: 10px;
    opacity: 0.8;
    text-transform: uppercase;
}

body .dce-offer-button, body a.dce-offer-button {
    display: flex;
    font-size: 14px;
    padding: 10px 20px;
    background: var(--dce-button-background-color);
    color: var(--dce-button-text-color);
    border-radius: var(--dce-card-border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
    align-items: center;
    justify-content: center;
}

body .dce-offer-button:hover, body a.dce-offer-button:hover {
    background: var(--dce-button-hover-background-color);
    color: var(--dce-button-hover-text-color);
    text-decoration: none;
}

body .dce-offer-button:focus, 
body a.dce-offer-button:focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--dce-button-background-color);
    text-decoration: none;
}

.dce-offer-expired-notice {
    background: #f5e9e9;
    color: #d63638;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

/* Expiry date - general styles */
.dce-offer-expiry {
    font-size: 14px;
    color: #646970;
    margin-top: 10px;
    font-weight: 500;
}

/* Expiry date when in footer */
.dce-offer-footer .dce-offer-expiry {
    display: block;
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}


/* Hidden offers */
.dce-offer-hidden {
    display: none;
}

/* Load More Button */
.dce-load-more-container {
    text-align: center;
    margin: var(--dce-spacing-lg, 24px) 0;
}

body .dce-load-more-button, body button.dce-load-more-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--dce-button-background-color);
    color: var(--dce-button-text-color);
    border: none;
    border-radius: var(--dce-button-border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin: 20px auto;
    position: relative;
}

body .dce-load-more-button:hover, body button.dce-load-more-button:hover {
    background-color: var(--dce-button-hover-background-color);
    color: var(--dce-button-hover-text-color);
}

body .dce-load-more-button:focus, 
body button.dce-load-more-button:focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--dce-button-background-color);
}

.dce-load-more-count {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-left: 5px;
}


/* Add loading indicator styles */
.dce-loading {
    position: relative;
    min-height: 50px;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dce-loading:before {
    content: '';
    position: absolute;
    left: 50%;
    top: 40%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--dce-primary-light, rgba(67, 97, 238, 0.1));
    border-top-color: var(--dce-primary-color, #4361ee);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    animation: dce-spin 0.8s cubic-bezier(0.65, 0.05, 0.36, 1) infinite;
    z-index: 2;
}

@keyframes dce-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add loading state for offers container */
.dce-offers-list.dce-loading {
    min-height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

.dce-loading-text {
    padding: 50px 20px 20px;
    text-align: center;
    font-size: 1.1em;
    color: var(--dce-secondary-color, #6c757d);
    font-weight: 500;
    position: relative;
    z-index: 1;
    background-color: transparent;
}

/* Error and no results messages */
.dce-error, 
.dce-no-results {
    padding: 30px;
    text-align: center;
    background-color: #f8f8f8;
    border-radius: 5px;
    margin: 20px 0;
    color: #666;
}

.dce-error {
    border-left: 4px solid #d63638;
    background-color: #fcf0f1;
}

.dce-no-results {
    border-left: 4px solid #dba617;
    background-color: #fcf8e3;
}

/* Responsive Styles */
@media screen and (max-width: 1200px) {
    .dce-offers-list.dce-layout-raster {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media screen and (max-width: 1024px) {
    .dce-offers-list.dce-layout-raster {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .dce-offer-title {
        font-size: 18px;
    }
    
    body .dce-offer {
        transition: transform 0.2s ease;
    }
    
    body .dce-offer:hover {
        transform: translateY(-2px);
    }
}

@media screen and (max-width: 768px) {
    /* Container and layout */
    .dce-offers-list.dce-layout-raster {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
        padding: 5px;
    }
    
    .dce-filters {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    
    /* Offer cards */
    body .dce-offer-content {
        height: auto;
        padding: 15px;
    }
    
    body .dce-offer {
        margin-bottom: 15px;
        display: block;
    }
    
    /* Filter elements */
    .dce-filter-search,
    .dce-filter-categories,
    .dce-search-container {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .dce-filter-sort {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dce-sort-select {
        width: 100%;
        margin-top: 5px;
    }
    
    
    body .dce-offer-button, 
    body a.dce-offer-button {
        padding: 12px 15px;
        width: 100%;
    }
    
    /* Popup */
    .dce-popup-content {
        margin: 30px auto;
        padding: 20px;
        max-width: 95%;
    }
    
    .dce-popup-title {
        font-size: 18px;
    }
    
    .dce-popup-close {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
}

@media screen and (max-width: 480px) {
.dce-offer-description.dce-description-truncated ul, .dce-popup-body ul{
    display: block !important;

}
.dce-offer-image img {
    display: block !important;
    height: 160px !important;
    max-height: var(--dce-image-height);
    object-fit: contain;
    object-position: center !important;
}
    /* Layout */
    .dce-offers-list.dce-layout-raster {
        grid-template-columns: 1fr;
    }
    
    .dce-offer-details {
        grid-template-columns: 1fr;
    }
    
    .dce-layout-standard .dce-offer {
        display: block !important;
    }
    
    /* Filters */
    .dce-filter-categories {
        max-width: 100%;
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding: 5px 0 15px 0;
    }
    
    body .dce-filter-button,
    body button.dce-filter-button {
        white-space: nowrap;
        flex-shrink: 0;
        scroll-snap-align: start;
        margin-right: 10px;
    }
    

    
    /* Content adjustments */
    .dce-offer-provider {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .dce-filter-search {
        width: 100%;
    }
    
    /* Typography */
    .dce-offer-description p,
    .dce-popup-body p {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Popup */
    .dce-popup-content {
        margin: 15px auto;
        padding: 15px;
    }
}

/* Small height screens */
@media screen and (max-height: 700px) {
    .dce-popup-content {
        margin: 10px auto;
        max-height: 90vh;
    }
}

/* Landscape mode on mobile */
@media screen and (max-width: 896px) and (orientation: landscape) {
    body .dce-offer-content {
        min-height: 180px;
    }
    
    .dce-popup-content {
        max-width: 90%;
        margin: 10px auto;
    }
}

/* WordPress compatibility reset */
body .dce-offers-container * {
    box-sizing: border-box;
    text-transform: capitalize;
}

body .dce-offers-container ul, 
body .dce-offers-container ol {
    margin: 0;
    padding: 0;
    list-style: none;
}


body .dce-offers-container a {
    text-decoration: none;
}

body .dce-offers-container a:hover,
body .dce-offers-container a:focus {
    text-decoration: none;
}

body .dce-offers-container button,
body .dce-offers-container input,
body .dce-offers-container select,
body .dce-offers-container textarea {
    font-family: inherit;
}

body .dce-filter-button:focus, 
body button.dce-filter-button:focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--dce-button-background-color);
}

/* Enhanced Responsive Styles */
@media screen and (max-width: 1024px) {
    .dce-offers-list.dce-layout-raster {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .dce-offer-title {
        font-size: 18px;
    }
}

@media screen and (max-width: 768px) {
    .dce-offers-list.dce-layout-raster {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }

    body .dce-offer-content {
        height: auto;
        min-height: 220px;
    }

    .dce-filter-search {
        width: 100%;
    }

    body .dce-offer-button, 
    body a.dce-offer-button {
        padding: 12px 15px;
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .dce-offers-list.dce-layout-raster {
        grid-template-columns: 1fr;
    }

    .dce-offer-details {
        grid-template-columns: 1fr;
    }

    .dce-filter-categories {
        max-width: 100%;
        overflow-x: auto;
        display: flex;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }

    body .dce-filter-button,
    body button.dce-filter-button {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* iPad/Tablet Optimizations */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    body .dce-offers-container {
        max-width: 95%;
        margin: 0 auto;
    }
    
    .dce-filters {
        padding: 15px;
    }
    
    .dce-filter-search {
        width: 100%;
    }
    
    .dce-filter-categories {
        margin-bottom: 15px;
    }
    
    .dce-offers-list.dce-layout-raster {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body .dce-offer {
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }
    
    body .dce-read-more-button,
    body button.dce-read-more-button {
        border-width: 0.5px;
        position: relative;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    body .dce-offer:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    body .dce-offers-container {
        width: 100%;
    }
    
    .dce-filters,
    .dce-load-more-container,
    .dce-read-more-button,
    button.dce-read-more-button,
    .dce-description-gradient {
        display: none !important;
    }
    
    body .dce-offer {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
    
    body .dce-offer-content {
        height: auto;
    }
    
    .dce-description-truncated {
        max-height: none;
        overflow: visible;
    }
    
    body .dce-offer-button,
    body a.dce-offer-button {
        border: 1px solid #000;
        background: transparent !important;
        color: #000 !important;
    }
}

/* Popup Styles */
.dce-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.dce-popup-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 25px;
    border-radius: 8px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    opacity: 0;
    animation: dce-popup-anim 0.3s ease forwards;
}

@keyframes dce-popup-anim {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dce-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.dce-popup-close:hover {
    color: #000;
}
.dce-offer-description.dce-description-truncated {
    padding: 10px;
    border-bottom: 1px solid #cab4b473;
}
.dce-popup-title {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: var(--dce-primary-color, #333);
    font-size: 22px;
}

.dce-popup-body {
    line-height: 1.6;
}

.dce-popup-body p {
    margin-bottom: 1em;
}

.dce-popup-body img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.dce-popup-open {
    overflow: hidden;
}

/* Skeleton Loading Animation */
.dce-offers-loading .dce-offers-list {
    opacity: 0.8;
}

.dce-offers-loading .dce-offers-list .dce-offer:not(.dce-skeleton-offer) {
    display: none !important;
}

.dce-skeleton-offer {
    animation: dce-skeleton-pulse 1.5s ease-in-out infinite;
    margin-bottom: 2rem;
    position: relative;
}

/* Apply the same styles as real offers but with skeleton elements */
.dce-skeleton-offer.dce-layout-standard {
    display: flex;
    flex-direction: row;
}
.dce-skeleton-container.dce-layout-raster {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(calc(33.333% - 20px), 1fr));
    grid-gap: 20px;
    width: 100%;
}
.dce-skeleton-offer.dce-layout-raster {
    display: flex;
    flex-direction: column;
    min-width: 353px;
}

.dce-skeleton-offer .dce-skeleton-provider,
.dce-skeleton-offer .dce-skeleton-title,
.dce-skeleton-offer .dce-skeleton-image,
.dce-skeleton-offer .dce-skeleton-line,
.dce-skeleton-offer .dce-skeleton-price,
.dce-skeleton-offer .dce-skeleton-button {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: dce-skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Match offer header structure */
.dce-skeleton-offer .dce-offer-header {
    flex: 1;
    min-width: 150px;
    background: #ffffff;
    padding: 20px;
    border-right: 1px solid #eee;
    position: relative;
    border-radius: var(--dce-card-border-radius) 0 0 var(--dce-card-border-radius);
}

.dce-skeleton-offer.dce-layout-raster .dce-offer-header {
    border-right: none;
    border-radius: 0;
}

/* Match offer content structure */
.dce-skeleton-offer .dce-offer-content {
    flex: 2;
    padding: 15px 20px;
    overflow: hidden;
    position: relative;
}

/* Match offer footer structure */
.dce-skeleton-offer .dce-offer-footer {
    flex: 1;
    background: #fefefe;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid #eee;
    border-radius: 0 var(--dce-card-border-radius) var(--dce-card-border-radius) 0;
}

.dce-skeleton-offer.dce-layout-raster .dce-offer-footer {
    border-left: none;
    border-radius: 0 0 var(--dce-card-border-radius) var(--dce-card-border-radius);
}

/* Individual skeleton elements */
.dce-skeleton-offer .dce-skeleton-provider {
    width: 65%;
    height: 1.2rem;
    margin-bottom: 0.7rem;
}

.dce-skeleton-offer .dce-skeleton-title {
    width: 90%;
    height: 1.5rem;
    margin-bottom: 1rem;
}

.dce-skeleton-offer .dce-skeleton-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
}

.dce-skeleton-offer.dce-layout-raster .dce-skeleton-image {
    height: 160px;
}

.dce-skeleton-offer .dce-skeleton-description {
    margin-bottom: 1rem;
}

.dce-skeleton-offer .dce-skeleton-line {
    width: 100%;
    height: 0.8rem;
    margin-bottom: 0.5rem;
}

.dce-skeleton-offer .dce-skeleton-line:nth-child(2) {
    width: 92%;
}

.dce-skeleton-offer .dce-skeleton-line:nth-child(3) {
    width: 80%;
}

.dce-skeleton-offer .dce-offer-details {
    margin: 15px 0;
    display: grid;
    gap: 15px;
    margin-bottom: 5px;
}

.dce-skeleton-offer .dce-skeleton-price {
    width: 25%;
    height: 1.3rem;
}

.dce-skeleton-offer .dce-skeleton-button {
    width: 100%;
    height: 2.5rem;
    border-radius: var(--dce-card-border-radius);
}

@keyframes dce-skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes dce-skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Add smooth transition */
.dce-offers-container {
    transition: opacity 0.3s ease;
}

/* Ensure skeleton offers match real offers for each layout */
.dce-offers-list.dce-layout-raster .dce-skeleton-offer {
    display: flex;
    flex-direction: column;
}

.dce-offers-list.dce-layout-standard .dce-skeleton-offer {
    display: flex;
    flex-direction: row;
}

.dce-offers-loading {
    position: relative;
}

.dce-offers-loaded .dce-skeleton-offer {
    display: none;
}

span.help.mr-1.mr-lg-2 {
    margin-right: 15px;

}
span.help.mr-2 {
    margin-right: 15px;
  
}
.row {
    display: flex;
    flex-wrap: wrap;
}
/* Hide filtered offers */
.dce-offer.dce-hidden {
    display: none !important;
}

/* Load more button styling */
.dce-load-more-container {
    margin: 2rem auto;
    text-align: center;
}

.dce-load-more-button {
    background-color: #2271b1;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.dce-load-more-button:hover {
    background-color: #135e96;
}

.dce-load-more-count {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-left: 5px;
}

/* Share Button Styles */
.dce-share-button {
    position: absolute;
    top: var(--dce-spacing-md);
    right: var(--dce-spacing-md);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: var(--dce-primary-color);
    color: #fff;
    border: none;
    border-radius: var(--dce-button-border-radius);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dce-share-button:hover {
    background-color: var(--dce-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--dce-button-shadow);
}

.dce-share-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

/* Share Dialog Styles */
.dce-share-url-container {
    display: flex;
    margin: 15px 0;
    width: 100%;
}

.dce-share-url {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--dce-border-color);
    border-right: none;
    border-radius: var(--dce-button-border-radius) 0 0 var(--dce-button-border-radius);
    font-size: 14px;
}

.dce-copy-url-button {
    padding: 10px 15px;
    background-color: var(--dce-primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--dce-button-border-radius) var(--dce-button-border-radius) 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dce-copy-url-button:hover {
    background-color: var(--dce-primary-hover);
}

.dce-copy-success {
    color: var(--dce-success-color);
    font-weight: 600;
    text-align: center;
    padding: 8px;
    background-color: var(--dce-success-light);
    border-radius: var(--dce-button-border-radius);
    margin-top: 10px;
}

/* Responsive Styles for Share Button */
@media screen and (max-width: 768px) {
    .dce-share-button {
        position: static;
        margin-top: var(--dce-spacing-md);
        width: 100%;
        justify-content: center;
    }
    
    .dce-share-url-container {
        flex-direction: column;
    }
    
    .dce-share-url {
        border-right: 1px solid var(--dce-border-color);
        border-radius: var(--dce-button-border-radius) var(--dce-button-border-radius) 0 0;
    }
    
    .dce-copy-url-button {
        border-radius: 0 0 var(--dce-button-border-radius) var(--dce-button-border-radius);
        padding: 12px;
    }
}

/* Modern Description Styles */
.dce-offer-description, .dce-popup-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.8;
    color: var(--dce-text-color);
    font-size: 15px;
}
.dce-offer-description.dce-description-truncated  ul  ,.dce-popup-body ul {
    list-style: none;
    padding: 0;
    }
    .dce-offer-description.dce-description-truncated  li::before ,.dce-popup-body li::before {
        content: '✔';
        color: #1a73e8;
        margin-right: 6px;
        font-size: 0.9rem;
    }
    
    
.dce-offer-description h3,
.dce-popup-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dce-primary-color);
    margin: 1.5em 0 0.8em;
    padding-bottom: 10px;
    position: relative;
}

.dce-offer-description h3::after,
.dce-popup-body h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--dce-primary-color);
    border-radius: 3px;
}

.dce-offer-description h4,
.dce-popup-body h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dce-text-color);
    margin: 1.2em 0 0.7em;
}

.dce-offer-description p,
.dce-popup-body p {
    margin-bottom: 1em;
    line-height: 1.8;
}

/* Modern lists */
.dce-offer-description ul,
.dce-popup-body ul {
    list-style-type: none;
    padding: 0;
    margin: 1.2em 0;
}

.dce-offer-description li,
.dce-popup-body li {
    position: relative;
    margin-bottom: 2px;
    line-height: 1.7;
}


/* Strong elements in lists */
.dce-offer-description ul li strong,
.dce-offer-description ul li b,
.dce-popup-body ul li strong,
.dce-popup-body ul li b {
    color: var(--dce-primary-color);
    font-weight: 600;
}

/* Modern "Mehr anzeigen" button */
button.dce-read-more-button, 
.dce-read-more-button{
    border-radius: 0 0 10px 10px;
    top: 0;
    right: -5px;
    min-height: 32px;

  }

button.dce-read-more-button:hover, 
.dce-read-more-button:hover {
    border: 1px solid #ffffff;
}

button.dce-read-more-button:active, 
.dce-read-more-button:active {
    box-shadow: 4px 4px 12px #c5c5c5, -4px -4px 12px #ffffff;
}

/* Responsive styles for description elements */
@media screen and (max-width: 768px) {
    .dce-offer-description,
    .dce-popup-body {
        font-size: 14px;
    }
    .dce-description-truncated {
        max-height: 155px;
    }
    .dce-offer-description li,
    .dce-popup-body li {
    }
    
    .dce-offer-description li::before,
    .dce-popup-body li::before {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
}

@media screen and (max-width: 480px) {
    .dce-offer-description h3,
    .dce-popup-body h3 {
        font-size: 1.2rem;
    }
    .dce-description-truncated {
        max-height: 155px;
    }
    .dce-offer-description h4,
    .dce-popup-body h4 {
        font-size: 1.1rem;
    }
    
    .dce-offer-description table,
    .dce-popup-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@keyframes expiry-shine {
    0% {
        transform: translateX(-100%);
    }
    60%, 100% {
        transform: translateX(100%);
    }
}

/* Skeleton Loading State */
.dce-offers-loading .dce-offers-list {
    display: none !important;
}

.dce-offers-loading .dce-skeleton-container {
    display: flex !important;
}

.dce-offers-loading.dce-layout-raster .dce-skeleton-container {
    display: grid !important;
}

.dce-offers-loaded .dce-skeleton-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.dce-offers-loaded .dce-offers-list {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: dce-fade-in 0.5s ease-in-out;
}

/* Fade-in animation */
@keyframes dce-fade-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 992px) {
    .dce-skeleton-container.dce-layout-raster {
        grid-template-columns: repeat(auto-fill, minmax(calc(50% - 15px), 1fr));
    }
}

@media (max-width: 576px) {
    .dce-skeleton-container.dce-layout-raster {
        grid-template-columns: 1fr;
    }
}

.dce-skeleton-container.dce-layout-standard {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dce-offers-container {
    position: relative;
}

.dce-skeleton-container {
    display: none; /* Hidden by default */
}

/* Initially show skeletons and hide content when loading */
.dce-offers-loading .dce-skeleton-container {
    display: flex;
    width: 100%;
}

.dce-offers-loading.dce-layout-raster .dce-skeleton-container {
    display: grid;
}