/*
================================================================================
HBN LOGISTIK - SHARED COMPONENT: 3-BOXEN (FLIP-CARDS) CSS
================================================================================
Version: 2.0
Letzte Änderung: 01.01.2026

FARBSCHEMA ANPASSEN:
Überschreibe die CSS-Variablen in deiner projekt-spezifischen CSS:

expressversand-usa.de:
.action-boxes-section {
    --box-primary: #002868;
    --box-secondary: #bf0a30;
    --box-primary-dark: #001845;
}

expressversand-china.de:
.action-boxes-section {
    --box-primary: #003366;
    --box-secondary: #f39200;
    --box-primary-dark: #002244;
}

epaket24.de:
.action-boxes-section {
    --box-primary: #333333;
    --box-secondary: #f39200;
    --box-primary-dark: #222222;
}
================================================================================
*/

/* ═══════════════════════════════════════════════════════════════════════════
   CSS VARIABLEN
   ═══════════════════════════════════════════════════════════════════════════ */
.action-boxes-section {
    /* Hauptfarben (projekt-spezifisch überschreiben) */
    --box-primary: #002868;
    --box-secondary: #bf0a30;
    --box-primary-dark: #001845;
    
    /* Neutrale Farben */
    --box-white: #ffffff;
    --box-text: #1a1a1a;
    --box-text-muted: #666666;
    --box-text-light: rgba(255, 255, 255, 0.9);
    --box-text-lighter: rgba(255, 255, 255, 0.6);
    
    /* Erfolgsfarbe */
    --box-success: #4ade80;
    
    /* Schatten */
    --box-shadow: 0 4px 25px rgba(0, 0, 0, 0.12);
    --box-shadow-hover: 0 10px 40px rgba(0, 0, 0, 0.3);
    
    /* Abmessungen */
    --box-width: 340px;
    --box-height: 240px;
    --box-radius: 16px;
    --box-gap: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */
.action-boxes-section {
    padding: 0;
    margin: 0;
}

.action-boxes {
    display: flex;
    justify-content: center;
    gap: var(--box-gap);
    max-width: 1100px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1080px) {
    .action-boxes {
        flex-wrap: wrap;
    }
}

@media (max-width: 380px) {
    .action-boxes-section {
        --box-width: 300px;
        --box-height: 230px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FLIP-BOX BASE
   ═══════════════════════════════════════════════════════════════════════════ */
.action-box {
    width: var(--box-width);
    height: var(--box-height);
    perspective: 1200px;
    cursor: pointer;
}

.action-box .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Hover-Flip nur für Nicht-Touch-Geräte */
@media (hover: hover) and (pointer: fine) {
    .action-box:hover .card-inner {
        transform: rotateX(-180deg);
    }
}

/* Flip via JavaScript-Klasse (für Touch und Focus) */
.action-box .card-inner.flipped {
    transform: rotateX(-180deg);
}

.action-box .card-front,
.action-box .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--box-radius);
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FRONT SIDE (Alle Boxen)
   ═══════════════════════════════════════════════════════════════════════════ */
.action-box .card-front {
    background: var(--box-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
}

/* Icon */
.action-box .card-front .box-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.action-box .card-front .box-icon i {
    font-size: 2.2rem;
    color: var(--box-secondary);
    transition: transform 0.3s ease;
}

.action-box:hover .card-front .box-icon i {
    transform: scale(1.1);
}

/* Title */
.action-box .card-front .box-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--box-text);
    margin: 0 0 6px 0;
}

/* Subtitle */
.action-box .card-front .box-subtitle {
    font-size: 0.9rem;
    color: var(--box-text-muted);
    margin: 0 0 12px 0;
}

/* CTA Link */
.action-box .card-front .box-link {
    font-size: 0.95rem;
    color: var(--box-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.action-box .card-front .box-link i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.action-box:hover .card-front .box-link i {
    transform: translateX(4px);
}

/* Animated Border */
.action-box .card-front .box-border {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--box-secondary), 
        var(--box-primary), 
        var(--box-secondary)
    );
    background-size: 200% 100%;
    animation: boxGradientMove 3s ease infinite;
}

@keyframes boxGradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BACK SIDE (Alle Boxen)
   ═══════════════════════════════════════════════════════════════════════════ */
.action-box .card-back {
    background: linear-gradient(135deg, 
        var(--box-primary) 0%, 
        var(--box-primary-dark) 40%, 
        color-mix(in srgb, var(--box-primary) 40%, var(--box-secondary)) 70%, 
        var(--box-secondary) 100%
    );
    transform: rotateX(180deg);
    box-shadow: var(--box-shadow-hover);
    display: flex;
    flex-direction: column;
}

/* Header */
.action-box .card-back-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.action-box .card-back-header .header-title {
    color: var(--box-white);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-box .card-back-header .header-title i {
    color: var(--box-text-light);
}

/* Content */
.action-box .card-back-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOX 1: ONLINE VERSENDEN
   ═══════════════════════════════════════════════════════════════════════════ */
.action-box .btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--box-primary);
    text-decoration: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.action-box .btn-cta:hover {
    background: var(--box-white);
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.action-box .btn-cta i {
    color: var(--box-secondary);
}

/* Features */
.action-box .cta-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--box-text-light);
}

.action-box .cta-features span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-box .cta-features i {
    color: var(--box-success);
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOX 2: SENDUNG VERFOLGEN
   ═══════════════════════════════════════════════════════════════════════════ */
.action-box .input-with-btn {
    display: flex;
    gap: 0;
}

.action-box .input-with-btn input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--box-white);
    transition: all 0.2s ease;
}

.action-box .input-with-btn input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.action-box .input-with-btn input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.action-box .input-with-btn button {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-box .input-with-btn button:hover {
    background: var(--box-white);
}

.action-box .input-with-btn button i {
    color: var(--box-secondary);
    font-size: 1.1rem;
}

/* Provider Hint */
.action-box .provider-hint {
    font-size: 0.75rem;
    color: var(--box-text-lighter);
    text-align: center;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOX 3: TARIFRECHNER
   ═══════════════════════════════════════════════════════════════════════════ */
.action-box.tarif .card-back-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

/* Type Toggle */
.action-box.tarif .type-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 3px;
}

.action-box.tarif .type-btn {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-box.tarif .type-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.action-box.tarif .type-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: var(--box-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.action-box.tarif .type-btn i {
    font-size: 0.75rem;
}

/* Form Content */
.action-box.tarif .card-back-content {
    padding: 12px 16px 16px;
    gap: 8px;
}

/* Input Rows */
.action-box.tarif .input-row {
    display: flex;
    gap: 8px;
}

.action-box.tarif .input-group {
    flex: 1;
    position: relative;
}

.action-box.tarif .input-group.small {
    flex: 0.8;
}

/* Floating Labels */
.action-box.tarif .input-group label {
    position: absolute;
    top: -6px;
    left: 10px;
    font-size: 0.55rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, 
        var(--box-primary-dark) 0%, 
        color-mix(in srgb, var(--box-primary) 60%, var(--box-secondary)) 100%
    );
    padding: 1px 5px;
    border-radius: 3px;
    z-index: 1;
}

/* Inputs */
.action-box.tarif input {
    width: 100%;
    padding: 10px 10px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--box-white);
    transition: all 0.2s ease;
}

.action-box.tarif input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

.action-box.tarif input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

/* Calculate Button */
.action-box.tarif .btn-calculate {
    width: 100%;
    padding: 11px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--box-primary);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.action-box.tarif .btn-calculate:hover {
    background: var(--box-white);
    transform: scale(1.02);
}

.action-box.tarif .btn-calculate i {
    color: var(--box-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY: Card bleibt geflippt bei Input-Focus
   ═══════════════════════════════════════════════════════════════════════════ */
.action-box .card-inner.flipped {
    transform: rotateX(-180deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHECKBOX ROW (Privatzustellung)
   ═══════════════════════════════════════════════════════════════════════════ */
.action-box.tarif .checkbox-row {
    justify-content: center;
    margin-top: 2px;
}

.action-box.tarif .checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

.action-box.tarif .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--box-secondary);
    cursor: pointer;
}

.action-box.tarif .checkbox-text {
    user-select: none;
}
