/* ========================================
   LOCATION CARDS - MODERN HORIZONTAL DESIGN
   ======================================== */

.cwb-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.cwb-location-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cwb-location-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cwb-location-card:hover {
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.cwb-location-card:hover::before {
    opacity: 1;
}

.cwb-location-card.selected {
    border-color: transparent;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.cwb-location-card.selected::before {
    opacity: 1;
}

.cwb-location-card.selected::after {
    content: '✓';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: checkmarkPop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Icon Wrapper */
.cwb-location-icon-wrapper {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    transition: all 0.3s ease;
}

.cwb-location-card:hover .cwb-location-icon-wrapper {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.cwb-location-icon-wrapper svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

/* Details Section */
.cwb-location-details {
    flex: 1;
    min-width: 0;
    /* Allow text truncation */
}

.cwb-location-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
    padding-right: 50px;
    /* Space for checkmark */
    word-wrap: break-word;
}

.cwb-location-address,
.cwb-location-phone {
    font-size: 14px;
    color: #6b7280;
    margin: 4px 0;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    word-wrap: break-word;
}

.cwb-location-address svg,
.cwb-location-phone svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: #9ca3af;
}

/* Legacy emoji support (fallback) */
.cwb-location-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cwb-locations-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .cwb-location-card {
        padding: 16px;
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .cwb-location-icon-wrapper,
    .cwb-location-icon {
        width: 56px;
        height: 56px;
        align-self: flex-start;
    }

    .cwb-location-icon-wrapper svg {
        width: 28px;
        height: 28px;
    }

    .cwb-location-icon {
        font-size: 28px;
    }

    .cwb-location-name {
        font-size: 16px;
        padding-right: 40px;
    }

    .cwb-location-address,
    .cwb-location-phone {
        font-size: 13px;
    }

    .cwb-location-card.selected::after {
        width: 32px;
        height: 32px;
        font-size: 16px;
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .cwb-locations-grid {
        grid-template-columns: 1fr;
    }
}