/**
 * Lebenslauf Generator - Stylesheet
 * Gekapselte Styles für den Lebenslauf-Generator
 */

/* Container - Exakt 11.5cm x 4cm (Portrait) */
.lebenslauf-container {
    width: calc(11cm + 5mm) !important;
    height: 4cm !important;
    margin: 20px auto;
    position: relative;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 0 !important;
    box-sizing: border-box;
    min-height: 4cm !important;
    max-height: 4cm !important;
}


/* Männchen-Icon zentriert */
.person-icon {
    position: absolute;
    top: calc(12px + 2mm);
    left: calc(50% - 1cm - 7mm - 8mm + 3mm);
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background: #87ceeb;
    border-radius: 50%;
    border: 1mm solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    opacity: 0;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.4);
}

.person-icon::before {
    content: '👤';
    filter: grayscale(100%) brightness(0) invert(1);
    display: block;
    font-size: 28px;
}

/* Streifen Container - 2 Spalten, 4 Reihen */
.streifen-container {
    position: absolute;
    top: 2mm;
    left: calc(15px + 3mm - 2mm - 1mm);
    width: calc(4cm - 8mm);
    height: calc(100% - 2mm);
    z-index: 2;
    padding-top: 70px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 15px;
    box-sizing: border-box;
    display: flex;
    gap: 8px;
}

/* Spalten für Linien */
.streifen-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Einzelne Streifen - 4 Reihen untereinander, alle gleich lang */
.streifen {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 4px;
    opacity: 0;
    transform: translateX(-100%);
    animation: streifenSlideIn 0.7s ease-out forwards;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Verschiedene Farben für die Streifen - 2 Spalten, 4 Reihen, jede einzeln animiert */
.streifen-column:nth-child(1) .streifen:nth-child(1) {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    animation-delay: 0.8s;
}

.streifen-column:nth-child(1) .streifen:nth-child(2) {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
    animation-delay: 1.0s;
}

.streifen-column:nth-child(1) .streifen:nth-child(3) {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    animation-delay: 1.2s;
}

.streifen-column:nth-child(1) .streifen:nth-child(4) {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
    animation-delay: 1.4s;
}

.streifen-column:nth-child(2) .streifen:nth-child(1) {
    background: linear-gradient(90deg, #fa709a 0%, #fee140 100%);
    animation-delay: 1.6s;
}

.streifen-column:nth-child(2) .streifen:nth-child(2) {
    background: linear-gradient(90deg, #30cfd0 0%, #330867 100%);
    animation-delay: 1.8s;
}

.streifen-column:nth-child(2) .streifen:nth-child(3) {
    background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%);
    animation-delay: 2.0s;
}

.streifen-column:nth-child(2) .streifen:nth-child(4) {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    animation-delay: 2.2s;
}


/* Animiertes Rechteck - von oben nach unten - ganz im Hintergrund */
.rechteck {
    position: absolute;
    top: 2mm;
    left: calc(15px + 3mm - 2mm - 1mm);
    width: calc(4cm - 7mm);
    height: calc(100% - 0mm);
    background: linear-gradient(135deg, #d8d8d8 0%, #e8e8e8 100%);
    border-radius: 0;
    opacity: 0;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: rechteckVonOben 0.8s ease-out 2.9s forwards;
    box-sizing: border-box;
}


/* Animationen */
@keyframes iconAppear {
    from {
        opacity: 0;
        transform: translateX(calc(-50% - 1cm - 7mm - 8mm + 3mm - 100%)) translateY(0) scale(1);
    }
    to {
        opacity: 1;
        transform: translateX(calc(-50% - 1cm - 7mm - 8mm + 3mm)) translateY(0) scale(1);
    }
}

@keyframes streifenSlideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rechteckVonOben {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rechter Bereich mit Auswahlschaltflächen */
.button-container {
    position: absolute;
    top: calc(50% - 7mm + 1cm - 5mm + 3mm);
    right: calc(15px + 0.5cm - 3mm - 1mm);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.button-item {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: buttonSlideIn 0.6s ease-out forwards;
}

.button-item:nth-child(1) {
    animation-delay: 3.5s;
}

.button-item:nth-child(2) {
    animation-delay: 3.7s;
}

.button-item:nth-child(3) {
    animation-delay: 3.9s;
}

.button-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #87ceeb;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.button-checkbox:hover {
    border-color: #87ceeb;
    box-shadow: 0 2px 8px rgba(135, 206, 235, 0.3);
}

.button-checkbox.checked {
    background: #4caf50;
    border-color: #4caf50;
}

.button-checkbox.checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 6px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: translate(-50%, -60%) rotate(-45deg);
}

.button-label {
    font-size: 11px;
    color: #333333;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

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

/* Button "Zur Lebenslauferstellung" */
.generator-button {
    margin-top: calc(15px - 3mm);
    padding: 12px 22px;
    background: #6a1b9a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-shadow: none;
    opacity: 0;
    animation: buttonSlideIn 0.6s ease-out forwards;
    animation-delay: 4.0s;
    transition: all 0.3s ease;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.generator-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.generator-button:hover::before {
    left: 100%;
}

.generator-button:hover {
    background: #4a148c;
    box-shadow: none;
    transform: translateY(-2px);
    color: #ffffff;
}

.generator-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.button-icon {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
}

.generator-button:hover .button-icon {
    transform: translateX(4px) rotate(0deg);
}

/* Responsive Styles für mobile Geräte */
@media screen and (max-width: 768px) {
    .lebenslauf-container {
        width: 100% !important;
        max-width: calc(11cm + 5mm);
        min-width: 280px;
        height: auto !important;
        min-height: 4cm !important;
        max-height: none !important;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .person-icon {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: calc(10px + 2mm);
        left: 50%;
        transform: translateX(-50%);
    }
    
    .person-icon::before {
        font-size: 24px;
    }
    
    .streifen-container {
        position: absolute;
        top: 2mm;
        left: 10px;
        width: calc(50% - 15px);
        max-width: calc(4cm - 8mm);
        height: calc(100% - 2mm);
        padding-top: 60px;
        padding-left: 6px;
        padding-right: 6px;
        padding-bottom: 10px;
    }
    
    .rechteck {
        position: absolute;
        top: 2mm;
        left: 10px;
        width: calc(50% - 12px);
        max-width: calc(4cm - 7mm);
        height: calc(100% - 0mm);
    }
    
    .button-container {
        position: absolute;
        top: 50%;
        right: 10px;
        left: auto;
        transform: translateY(-50%);
        width: calc(50% - 15px);
        max-width: 200px;
        margin-top: 0;
        align-items: flex-start;
    }
    
    .button-item {
        width: 100%;
    }
    
    .button-label {
        font-size: 13px;
    }
    
    .generator-button {
        width: 100%;
        font-size: 14px;
        padding: 14px 20px;
        margin-top: 10px;
        text-align: center;
        white-space: nowrap;
    }
    
    .button-icon {
        width: 18px;
        height: 18px;
    }
}

/* Sehr kleine Bildschirme */
@media screen and (max-width: 480px) {
    .lebenslauf-container {
        padding: 8px;
    }
    
    .person-icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .person-icon::before {
        font-size: 20px;
    }
    
    .streifen-container {
        padding-top: 50px;
        gap: 6px;
    }
    
    .streifen {
        height: 8px;
    }
    
    .button-label {
        font-size: 12px;
    }
    
    .generator-button {
        font-size: 13px;
        padding: 12px 18px;
    }
    
    .button-checkbox {
        width: 16px;
        height: 16px;
    }
}
