/* Aktions-Header Styles */
.aktions-header {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
    display: none; /* Wird per JS eingeblendet */
    width: 100%;
    box-sizing: border-box;
    background-clip: padding-box; /* Verhindert, dass der Hintergrund überläuft */
}

/* Wichtig: Stelle sicher, dass alle Elemente im Header die Box-Sizing-Regel erben */
.aktions-header *,
.aktions-header *::before,
.aktions-header *::after {
    box-sizing: border-box;
}

/* Header-Inhalts-Container */
.aktions-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.header-main-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Positionierungs-Klassen */
.aktions-header.position-top {
    position: relative;
    top: 0;
}

.aktions-header.position-bottom {
    position: relative;
    bottom: auto;
    order: 999; /* Wird im Flexbox-Layout ans Ende gesetzt */
}

/* Floating-Position am unteren Rand wurde entfernt */

.aktions-header.position-floating_top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* Basis-Animation für alle Header (kann in Template-spezifisch überschrieben werden) */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Template-spezifische Designs */

/* Standard Template - Basis-Stil ist bereits in den allgemeinen Styles definiert */

/* Highlight Template */
.aktions-header.template-highlight {
    padding: 18px 30px;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.aktions-header.template-highlight .cta-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.aktions-header.template-highlight .cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.aktions-header.template-highlight .countdown-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 6px;
}

/* Pulse-Animation für CTA-Button im Highlight-Template */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.aktions-header.template-highlight .cta-button.pulse {
    animation: pulse 1s;
}

/* Minimal Template */
.aktions-header.template-minimal {
    padding: 8px 15px;
    font-size: 14px;
    opacity: 0.9;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.aktions-header.template-minimal .aktions-header-content {
    justify-content: center;
}

.aktions-header.template-minimal .countdown-container {
    font-size: 13px;
}

.aktions-header.template-minimal .countdown-item {
    padding: 3px;
    min-width: 24px;
}

.aktions-header.template-minimal .countdown-value {
    font-size: 13px;
}

.aktions-header.template-minimal .countdown-label {
    font-size: 9px;
}

.aktions-header.template-minimal .cta-button {
    padding: 5px 12px;
    font-size: 13px;
    border-radius: 3px;
}

/* Banner Template */
.aktions-header.template-banner {
    padding: 25px 30px;
}

.aktions-header.template-banner .aktions-header-content {
    flex-direction: column;
    align-items: center;
}

.aktions-header.template-banner .header-text {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
}

.aktions-header.template-banner .header-actions {
    justify-content: center;
    margin-top: 15px;
}

.aktions-header.template-banner .countdown-container {
    margin: 10px auto;
}

.aktions-header.template-banner .countdown-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    min-width: 70px;
    border-radius: 8px;
    margin: 0 5px;
}

.aktions-header.template-banner .countdown-value {
    font-size: 24px;
    font-weight: 700;
}

.aktions-header.template-banner .cta-button {
    padding: 12px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Two Rows Template */
.aktions-header.template-two_rows .aktions-header-content {
    flex-direction: column;
}

.aktions-header.template-two_rows .header-main-content,
.aktions-header.template-two_rows .header-actions {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.aktions-header.template-two_rows .header-main-content {
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

/* Animation-Klassen */
.aktions-header.bg-animate {
    background-size: 200% 200%;
    animation: gradientBG 10s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Utility-Klassen für Animationen */
.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

@keyframes bounce {
    from, 20%, 53%, 80%, to {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -30px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes pulse {
    from {
        transform: scale3d(1, 1, 1);
    }
    50% {
        transform: scale3d(1.05, 1.05, 1.05);
    }
    to {
        transform: scale3d(1, 1, 1);
    }
}

/* Positionierungsklassen werden per JS hinzugefügt */
.aktions-header-bottom {
    order: 9999;
    margin-top: auto;
}

.aktions-header-floating {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.aktions-header-floating-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Countdown Styles */
.countdown-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.countdown-text {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.countdown {
    display: flex;
    gap: 8px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 35px;
    padding: 4px 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.countdown-value {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    display: block;
}

.countdown-label {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.9;
    line-height: 1;
    margin-top: 2px;
}

/* Action Buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.coupon-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.coupon-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

.coupon-copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.coupon-copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.coupon-copy-btn:active {
    transform: translateY(0);
}

.copy-feedback {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    text-align: center;
    min-width: 100px;
    display: none;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    z-index: 10;
}

.cta-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    color: white !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

.cta-button:active {
    transform: translateY(0);
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .aktions-header {
        padding: 15px 20px;
    }
    
    .aktions-header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-main-content {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        align-items: center;
    }
    
    .header-text {
        font-size: 16px;
        text-align: center;
        width: 100%;
    }
    
    .countdown-container {
        justify-content: center;
        width: 100%;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
        gap: 15px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .aktions-header {
        padding: 10px 15px;
    }
    
    .aktions-header-content {
        gap: 15px;
    }
    
    .header-main-content {
        gap: 15px;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    
    .header-text {
        font-size: 14px;
        text-align: center;
        width: 100%;
    }
    
    .countdown-container {
        gap: 8px;
        justify-content: center;
        width: 100%;
    }
    
    .countdown-text {
        font-size: 12px;
    }
    
    .countdown-item {
        min-width: 30px;
        padding: 3px 5px;
    }
    
    .countdown-value {
        font-size: 14px;
    }
    
    .countdown-label {
        font-size: 9px;
    }
    
    .coupon-code {
        font-size: 12px;
        padding: 5px 8px;
    }
    
    .coupon-copy-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .cta-button {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .aktions-header {
        padding: 12px 12px 16px;
    }
    
    .aktions-header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .header-main-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .header-text {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .countdown-container {
        margin-bottom: 8px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 100%;
    }
      .coupon-container {
        margin-bottom: 5px;
        width: 100%;
        justify-content: center;
        display: flex; /* Sicherstellen, dass der Container angezeigt wird */
    }
    
    .coupon-copy-btn {
        display: flex; /* Sicherstellen, dass der Button angezeigt wird */
    }
    
    /* Alternative Mobile Layout mit eigenem Container */
    .aktions-header-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .mobile-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    
    .mobile-top-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .mobile-text {
        font-size: 12px;
        font-weight: 500;
        text-align: center;
    }
      .mobile-countdown {
        margin-bottom: 8px;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .mobile-countdown-items {
        display: flex;
        gap: 6px;
    }
    
    .mobile-countdown-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 28px;
        padding: 3px 4px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 3px;
        backdrop-filter: blur(4px);
    }
    
    .mobile-countdown-value {
        font-size: 14px;
        font-weight: 700;
        line-height: 1;
        display: block;
    }
    
    .mobile-countdown-label {
        font-size: 9px;
        text-transform: uppercase;
        opacity: 0.9;
        line-height: 1;
        margin-top: 2px;
    }
    
    .mobile-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    .mobile-coupon-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }
    
    .mobile-cta-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        margin-top: 4px;
    }
      .mobile-coupon-code {
        font-family: 'Courier New', Courier, monospace;
        font-size: 11px;
        font-weight: 700;
        padding: 5px 10px;
        background: rgba(255, 255, 255, 0.2);
        border: 1px dashed rgba(255, 255, 255, 0.4);
        border-radius: 3px;
        color: inherit;
        margin-right: 5px;
    }
    
    .mobile-coupon-btn {
        display: flex;
        align-items: center;
        gap: 5px;
        padding: 5px 10px;
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 3px;
        color: inherit;
        font-size: 11px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }
      .mobile-coupon-btn:hover {
        background: rgba(255, 255, 255, 0.3);
    }
      .mobile-copy-feedback {
        position: absolute;
        top: -25px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(255, 255, 255, 0.95);
        color: #333;
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 12px;
        font-weight: 500;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        text-align: center;
        min-width: 80px;
        display: none;
        transition: all 0.2s ease-in-out;
        font-size: 10px;
        white-space: nowrap;
        z-index: 10;
    }
    
    .mobile-cta-btn {
        padding: 6px 12px;
        border: none;
        border-radius: 4px;
        color: white !important;
        font-size: 11px;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s ease;
        display: inline-block;
        text-align: center;
    }
    
    .mobile-cta-btn:hover {
        filter: brightness(1.1);
    }
    
    .mobile-close-btn {
        position: absolute;
        top: 6px;
        right: 6px;
        background: none;
        border: none;
        color: inherit;
        font-size: 16px;
        cursor: pointer;
        padding: 2px;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0.8;
    }
    
    .mobile-close-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        opacity: 1;
    }
}

/* Animation für Copy-Feedback */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(5px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
}

.copy-feedback.show {
    animation: fadeInOut 2s ease-out;
    display: block !important;
}

/* Erfolgs- und Fehler-Stile für die Kopier-Bestätigung */
.copy-feedback.success {
    color: #4CAF50 !important;
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.copy-feedback.error {
    color: #f44336 !important;
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-copy-feedback.success {
    color: #4CAF50 !important;
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-copy-feedback.error {
    color: #f44336 !important;
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Countdown abgelaufen */
.countdown.expired {
    opacity: 0.5;
}

.countdown.expired .countdown-value {
    color: #ff6b6b;
}

.mobile-countdown-expired {
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Accessibility */
.aktions-header *:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .aktions-header {
        border: 2px solid;
    }
    
    .countdown-item,
    .coupon-code,
    .coupon-copy-btn {
        border: 1px solid;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .aktions-header {
        animation: none;
    }
    
    .coupon-copy-btn:hover,
    .cta-button:hover,
    .close-btn:hover {
        transform: none;
    }
    
    .copy-feedback.show {
        animation: none;
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .aktions-header {
        display: none !important;
    }
}