/* 
   CoParently Plan Quiz Styles 
   Description: Clean, modern, and accessible styling for the CoParently Betreuungsmodell Quiz.
*/

:root {
    --cpq-primary: #13daec;
    --cpq-primary-hover: #11c5d4;
    --cpq-secondary: #f3f4f6;
    --cpq-text-dark: #2c3e50;
    --cpq-text-light: #7f8c8d;
    --cpq-white: #ffffff;
    --cpq-radius: 12px;
    --cpq-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --cpq-transition: all 0.3s ease;
}

.coparently-quiz-container {
    max-width: 600px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--cpq-text-dark);
    position: relative;
}

/* Progress Bar */
#cpq-progress-wrapper {
    width: 100%;
    height: 8px;
    background: #eef2f7;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

#cpq-progress-bar {
    height: 100%;
    background: var(--cpq-primary);
    width: 0%;
    transition: width 0.4s ease-out;
}

#cpq-step-indicator {
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cpq-text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cpq-card {
    background: var(--cpq-white);
    border-radius: var(--cpq-radius);
    padding: 2.5rem;
    box-shadow: var(--cpq-shadow);
    text-align: center;
    border: 1px solid #edf2f7;
    overflow: hidden;
}

.cpq-fade-in {
    animation: cpq-fadeIn 0.5s ease forwards;
}

.cpq-fade-out {
    animation: cpq-fadeOut 0.3s ease forwards;
}

@keyframes cpq-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cpq-fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

.cpq-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    color: var(--cpq-primary);
}

.cpq-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--cpq-text-light);
}

.cpq-options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cpq-btn {
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--cpq-transition);
    border: none;
    outline: none;
    display: block;
    width: 100%;
}

.cpq-option-btn {
    background: var(--cpq-secondary);
    color: var(--cpq-text-dark);
}

.cpq-option-btn:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.cpq-primary-btn {
    background: var(--cpq-primary);
    color: var(--cpq-white);
    margin-top: 1rem;
}

.cpq-primary-btn:hover {
    background: var(--cpq-primary-hover);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.cpq-secondary-btn {
    background: transparent;
    color: var(--cpq-text-light);
    border: 1px solid #d1d5db;
    width: auto;
    margin: 2rem auto 0;
}

.cpq-secondary-btn:hover {
    background: var(--cpq-secondary);
    color: var(--cpq-text-dark);
}

/* Results Display */
.cpq-results-list {
    text-align: left;
    margin-top: 2rem;
}

.cpq-result-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    transition: var(--cpq-transition);
}

.cpq-top-match {
    border: 2px solid var(--cpq-primary);
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(19, 218, 236, 0.1);
}

.cpq-model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.cpq-model-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--cpq-text-dark);
}

.cpq-match-badge {
    background: #e3fcfd;
    color: var(--cpq-primary);
    width: 65px;
    height: 65px;
    min-width: 65px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(19, 218, 236, 0.15);
    border: 2px solid #fff;
}

.cpq-match-badge span {
    font-size: 1.15rem;
    font-weight: 800;
}

.cpq-match-badge small {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 2px;
}

.cpq-match-bar-bg {
    width: 100%;
    height: 8px;
    background: #edf2f7;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.cpq-match-bar {
    height: 100%;
    background: var(--cpq-primary);
    border-radius: 10px;
    transition: width 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.cpq-model-desc {
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--cpq-text-light);
}

.cpq-compat-hint {
    background: #f0fdfa;
    border-left: 4px solid var(--cpq-primary);
    padding: 14px 18px;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    color: var(--cpq-text-dark);
    border-radius: 4px;
}

/* Calendar-Style Plan Preview - Responsive Optimierung */
.cp-plan-calendar-block {
    margin: 30px auto;
    max-width: 100%;
    font-family: 'Inter', sans-serif;
    padding: 0 10px;
}

.cp-plan-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    color: var(--cpq-text-dark);
}

.cp-calendar-container {
    background: #f8fafc;
    padding: 15px; /* Reduziert von 25px */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.cp-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.cp-weekday-label {
    font-size: 0.65rem; /* Kleiner für Mobile */
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.5px;
}

.cp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px; /* Kleinerer Abstand zwischen den Boxen */
}

.cp-calendar-day {
    aspect-ratio: 1 / 1;
    border-radius: 8px; /* Etwas weniger rund für mehr Platz */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Zentriert den Inhalt */
    align-items: center;
    padding: 5px;
    color: #fff;
    position: relative;
    transition: transform 0.2s ease;
}

.cp-day-num {
    font-size: 1.1rem; /* Kompakter */
    font-weight: 800;
    line-height: 1;
}

.cp-switch-bubble {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #1e293b;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1.5px solid #fff;
    z-index: 5;
}

.cp-switch-bubble .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

.cp-day-bottom {
    display: none; /* Versteckt "MAMA/PAPA" Text in der Box auf Mobile, um Platz zu sparen */
}

.cp-plan-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Erlaubt Umbruch der Legende */
    gap: 15px;
    margin-top: 20px;
}

/* --- Responsive Breakpoints --- */

/* Tablet & Mobile (Standard) */
@media (max-width: 768px) {
    .cp-calendar-grid {
        gap: 5px;
    }
    .cp-day-num {
        font-size: 0.9rem;
    }
}

/* Smartphone (Hochformat) */
@media (max-width: 480px) {
    .cp-calendar-grid {
        grid-template-columns: repeat(7, 1fr); /* Behält 7 Tage bei, macht sie aber sehr klein */
        gap: 4px;
    }
    
    .cp-calendar-container {
        padding: 8px;
    }

    .cp-day-num {
        font-size: 0.8rem;
    }

    /* Falls die 7-Tage-Ansicht zu klein wird, wechselt dieses Modell auf 4 Spalten */
    .cp-duration-28 .cp-calendar-grid,
    .cp-duration-14 .cp-calendar-grid {
         /* Optional: Wenn du lieber scrollen willst, hier 'overflow-x: auto' setzen */
    }
    
    .cp-switch-bubble {
        width: 16px;
        height: 16px;
        top: -5px;
        right: -5px;
    }
}

/* Extrem schmale Handys */
@media (max-width: 350px) {
    .cp-calendar-grid {
        grid-template-columns: repeat(4, 1fr); /* Bricht auf 4 Spalten um, damit Boxen klickbar bleiben */
    }
    .cp-calendar-weekdays {
        display: none; /* Wochentage passen dann nicht mehr zum Grid */
    }
}