/* static/css/profiles.css */
/* Flavor and Texture Profile Styling */

/* ===== COMMON STYLES ===== */

.flavor-profile-section,
.texture-profile-section {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-heading);
}

.info-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--color-subtle);
    transition: color 0.2s ease;
}

.info-btn:hover {
    color: var(--color-accent);
}

.info-btn svg {
    display: block;
}

/* Info Popup */
.info-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.info-popup.show {
    opacity: 1;
}

.info-popup-content {
    background: var(--color-card);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.info-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-subtle);
    transition: color 0.2s ease;
    padding: 0;
    width: 32px;
    height: 32px;
}

.info-popup-close:hover {
    color: var(--color-accent);
}

.info-popup-content h4 {
    margin: 0 0 1rem 0;
    color: var(--color-heading);
    font-size: 1.25rem;
}

.info-popup-content p {
    margin: 0.75rem 0;
    line-height: 1.6;
    color: var(--color-text);
}

.muted-text {
    color: var(--color-subtle);
    font-size: 0.9rem;
}

.muted-label {
    color: var(--color-subtle);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== FLAVOR RADAR CHART ===== */

.flavor-radar-container {
    max-width: 400px;
    margin: 0 auto 1.5rem;
    padding: 1rem;
}

.flavor-radar-container canvas {
    max-width: 100%;
    height: auto;
}

.flavor-suggestions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.flavor-suggestions h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-heading);
}

.flavor-suggestions ul {
    margin: 0;
    padding-left: 1.5rem;
}

.flavor-suggestions li {
    margin: 0.5rem 0;
    line-height: 1.5;
    color: var(--color-text);
}

.flavor-profile-empty,
.texture-profile-empty {
    text-align: center;
    padding: 2rem 1rem;
}

/* ===== TEXTURE DISPLAY ===== */

.texture-main-card {
    display: flex;
    gap: 1.5rem;
    background: var(--color-bg);
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.texture-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--color-card);
    border: 2px solid var(--color-border);
}

.texture-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.texture-content {
    flex: 1;
    min-width: 0;
}

.texture-header {
    margin-bottom: 0.5rem;
}

.texture-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.texture-name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-heading);
}

.texture-description {
    margin: 0.5rem 0;
    line-height: 1.5;
    color: var(--color-text);
}

.texture-examples {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: var(--color-subtle);
}

/* Texture Badges (Secondary textures) */
.texture-secondary {
    margin-top: 1.5rem;
}

.texture-secondary-heading {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-heading);
}

.texture-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.texture-badge {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.texture-badge:hover {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    transform: translateY(-1px);
}

/* Texture Tooltip (for badge clicks) */
.texture-tooltip {
    position: fixed;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1rem;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.texture-tooltip.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.texture-tooltip h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-heading);
}

.texture-tooltip p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-text);
}

.texture-sources {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .flavor-profile-section,
    .texture-profile-section {
        padding: 1rem;
    }

    .section-heading {
        font-size: 1.125rem;
    }

    .flavor-radar-container {
        max-width: 100%;
        padding: 0.5rem;
    }

    .texture-main-card {
        flex-direction: column;
        gap: 1rem;
    }

    .texture-image {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .texture-header {
        text-align: center;
    }

    .texture-name {
        font-size: 1.25rem;
    }

    .info-popup-content {
        padding: 1.5rem;
    }
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
    .info-popup {
        background: rgba(0, 0, 0, 0.7);
    }

    .texture-tooltip {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}
