/* Base selectable card styles */
.selectable-card {
    position: relative;
    border: 2px solid #ddd;
    /*border-radius: 8px;*/
    background: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.selectable-card:hover {
    border-color: #aaa;
}

.selectable-card.selected {
    border-color: #000;
    background: #fafafa;
    box-shadow: inset 0 0 0 4px #fff;
}

.selectable-card .check {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 32px;
    height: 32px;
    background: #000;
    border-radius: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.selectable-card.selected .check {
    display: flex;
    /*border: 2px solid #fff;*/
}

/* Communication card specific styles */
.selectable-card.comm-card {
    padding: 0;
    overflow: hidden;
}

.selectable-card.comm-card.selected .comm-illustration {
    margin: 2px 2px 0 2px;
    width: calc(100% - 4px);
    height: 156px;
}

.selectable-card.comm-card.selected .comm-content {
    padding: 18px 22px 22px 22px;
}

.selectable-card.comm-card.selected .check {
    /*top: 4px;*/
    /*right: 4px;*/
    border: 2px solid #fff;
}

.selectable-card .comm-illustration {
    height: 160px;
    background: #e8e8e8;
    margin-bottom: 0;
    border-radius: 0;
    width: 100%;
}

.selectable-card .comm-content {
    padding: 22px;
}

.selectable-card .comm-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.selectable-card .comm-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.selectable-card .comm-desc .distance-note {
    background: #fffbdc;
    padding: 2px 4px;
    /*border-radius: 3px;*/
    display: inline-block;
    margin-top: 2px;
}

/* Duration card specific styles */
.selectable-card.duration-card {
    padding: 24px;
}

.selectable-card .duration-title {
    font-size: 42px;
    font-weight: 600;
}

.selectable-card .duration-title span {
    font-size: 14px;
    margin-left: 6px;
    font-weight: 400;
}

.selectable-card .duration-desc {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.selectable-card .popular {
    position: absolute;
    top: 40%;
    right: 24px;
    background: #f2d851;
    color: #000000;
    font-size: 12px;
    padding: 4px 8px;
    /*border-radius: 4px;*/
}

/* Select card specific styles (for step4) */
.selectable-card.select-card {
    padding: 18px;
    background: #fff;
    min-height: 170px;
    position: relative;
}

.selectable-card.select-card.selected {
    background: #fafafa;
    box-shadow: inset 0 0 0 4px #fff;
}

.selectable-card .card-title {
    font-weight: 600;
    color: #222;
    font-size: 13px;
}

.selectable-card .card-illustration {
    min-height: 60%;
    min-width: 60%;
    margin: 14px auto 10px;
    background: #f0f0f0;
    /*border-radius: 4px;*/
    position: relative;
}

/* Project card specific styling - position title between illustration and description */
.selectable-card.select-card:not(.timeline-card) .card-top {
    margin: 12px 0 8px 0;
    text-align: center;
}

.selectable-card.select-card:not(.timeline-card) .card-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.selectable-card .card-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.35;
}

.selectable-card .card-desc.muted {
    color: #999;
}

/* Timeline card specific styles */
.selectable-card.timeline-card {
    min-height: 140px;
}

.selectable-card.timeline-card.selected {
    background: #fafafa;
    box-shadow: inset 0 0 0 4px #fff;
}

.selectable-card .timeline-big {
    font-size: 38px;
    font-weight: 600;
    margin-top: 14px;
    color: #222;
}

.selectable-card .timeline-big span {
    font-size: 12px;
    font-weight: 400;
    margin-left: 6px;
    color: #666;
}

.selectable-card .info-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    border: 1px solid #bbb;
    font-size: 10px;
    color: #777;
}

/* Grid layout styles */
.card-grid {
    display: grid;
    gap: 20px;
}

.card-grid--1 {
    grid-template-columns: 1fr;
}

.card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Mobile responsive styles for cards */
@media (max-width: 768px) {
    /* Force all card grids to single column on tablet */
    .card-grid--2,
    .card-grid--3 {
        grid-template-columns: 1fr;
    }

    .card-grid {
        gap: 16px;
    }

    .selectable-card.select-card:not(.timeline-card) .card-top {
        text-align: inherit;
    }

    /* Communication card responsive - horizontal layout on tablet */
    .selectable-card.comm-card {
        min-height: auto;
        display: flex;
        flex-direction: row;
        padding: 0;
    }

    .selectable-card.comm-card .comm-illustration {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
        margin: 0;
    }

    .selectable-card.comm-card .comm-content {
        padding: 18px;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .selectable-card.comm-card.selected .comm-illustration {
        width: 116px;
        height: 116px;
        margin: 2px;
    }

    .selectable-card.comm-card.selected .comm-content {
        padding: 16px 18px;
    }

    .selectable-card .comm-title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .selectable-card .comm-desc {
        font-size: 14px;
        line-height: 1.3;
    }

    /* Duration card responsive */
    .selectable-card.duration-card {
        padding: 20px;
        min-height: auto;
    }

    .selectable-card .duration-title {
        font-size: 36px;
    }

    .selectable-card .duration-title span {
        font-size: 13px;
    }

    .selectable-card .duration-desc {
        font-size: 14px;
        margin-top: 8px;
    }

    .selectable-card .popular {
        right: 20px;
        top: 20px;
        font-size: 11px;
        padding: 3px 6px;
    }

    /* Checkmark responsive */
    .selectable-card .check {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Hide images completely on mobile and return to vertical layout */
    .selectable-card.comm-card {
        display: block; /* Override flex from tablet */
        padding: 16px;
        min-height: 100px;
    }

    .selectable-card .comm-illustration {
        display: none;
    }

    .selectable-card.comm-card .comm-content {
        padding: 0;
        flex: none; /* Reset flex from tablet */
    }

    .selectable-card .comm-title {
        font-size: 15px;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .selectable-card .comm-desc {
        font-size: 13px;
        line-height: 1.4;
        color: #666;
    }

    .selectable-card.select-card:not(.timeline-card) .card-top {
        text-align: inherit;
    }

    /* Duration cards for mobile */
    .selectable-card.duration-card {
        padding: 16px;
        min-height: 80px;
        position: relative;
    }

    .selectable-card .duration-title {
        font-size: 32px;
    }

    .selectable-card .duration-title span {
        font-size: 12px;
    }

    .selectable-card .duration-desc {
        font-size: 13px;
        margin-top: 6px;
    }

    .selectable-card .popular {
        right: 16px;
        top: 16px;
        font-size: 10px;
        padding: 2px 5px;
    }

    /* Smaller checkmark for mobile */
    .selectable-card .check {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    /* Better touch targets */
    .selectable-card {
        min-height: 60px;
        transition: all 0.2s ease;
    }

    .selectable-card:active {
        transform: scale(0.98);
    }

    /* Project cards mobile adjustments */
    .selectable-card.select-card {
        padding: 14px;
        min-height: 120px;
    }

    .selectable-card .card-title {
        font-size: 14px;
    }

    .selectable-card .card-desc {
        font-size: 11px;
    }

    .selectable-card .card-illustration {
        height: 60%;
        width: 50%;
        margin: 8px auto 6px;
    }

    /* Timeline cards mobile */
    .selectable-card.timeline-card {
        min-height: 100px;
        padding: 14px;
    }

    .selectable-card .timeline-big {
        font-size: 32px;
        margin-top: 8px;
    }

    .selectable-card .timeline-big span {
        font-size: 11px;
    }

    .selectable-card .info-dot {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
}

