/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

#svg-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    max-width: 90%;
}

/* --- SVG Node Interaction Styles --- */
/* The interactive class is added by JS to nodes that have data */
.node-interactive {
    cursor: pointer;
}

/* Style the rectangle inside the group on hover */
.node-hover rect {
    stroke: #ff6347; /* Tomato Red */
    stroke-width: 4px !important; /* Use !important to override inline styles from yEd */
}

/* Style the rectangle inside the group when selected */
.node-selected rect {
    stroke: #4169e1; /* Royal Blue */
    stroke-width: 4px !important;
    filter: drop-shadow(0 4px 6px rgba(65, 105, 225, 0.5));
}


/* Add this new main container style */
.main-container {
    display: flex;
    flex-direction: column; /* Stacks items vertically by default (for mobile) */
    align-items: center;
    width: 100%;
    gap: 2rem; /* Adds space between the SVG and the card */
}

#svg-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    /* Remove margin-bottom, as 'gap' handles spacing now */
    width: 100%; /* Make it responsive */
    max-width: 90%;
    flex-shrink: 0; /* Prevents the SVG container from shrinking */
}

/* --- Information Card Styles --- */
#info-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    padding: 1.5rem 2rem;
    width: 100%; /* Make it responsive */
    max-width: 800px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    opacity: 1;
    position: relative;
}

/* --- MEDIA QUERY FOR DESKTOP --- */
/* When the screen is 992px or wider, apply these styles */
@media (min-width: 992px) {
    .main-container {
        flex-direction: row;
        align-items: flex-start;
        width: 100%; /* Ensure the container spans the full page width */
    }

    #svg-container {
        /* Define a fixed base size for the SVG */
        width: 60%; 
        max-width: 800px;
        flex-shrink: 0; /* Prevents the SVG from shrinking */
    }
    
    #info-card {
        /* This is the key change: */
        flex-grow: 1; /* Tells the card to expand and fill remaining space */

        /* Keep the sticky positioning */
        position: sticky;
        top: 2rem;
        
        /* We no longer need to define a width or max-width here */
    }
}



/* --- Information Card Styles --- */
#info-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    padding: 1.5rem 2rem;
    width: 100%;
    max-width: 800px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    opacity: 1;
    position: relative;
}

#info-card.hidden {
    opacity: 0;
    transform: translateY(0);
    padding: 0;
    height: 0;
    overflow: hidden;
}

#info-card h2 {
    margin-top: 0;
    color: #1a202c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#info-card p {
    line-height: 1.6;
    color: #4a5568;
}

#info-card img {
    max-width: 100%;
    border-radius: 6px;
    margin-top: 1rem;
    border: 1px solid #eee;
}

#card-close-btn {
    font-size: 1.5rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    background: none;
    border: none;
}
#card-close-btn:hover {
    color: #333;
}


/* --- Status Badge Styles --- */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}
.status-badge[data-status="active"] { background-color: #28a745; } /* Green */
.status-badge[data-status="testing"] { background-color: #fd7e14; } /* Orange */
.status-badge[data-status="development"] { background-color: #007bff; } /* Blue */
.status-badge[data-status="roadmap"] { background-color: #6f42c1; } /* Purple */


/* --- Links Section --- */
.card-links {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.card-links a {
    color: #4169e1;
    text-decoration: none;
    font-weight: bold;
    margin-right: 1.5rem;
}
.card-links a:hover {
    text-decoration: underline;
}



/* --- Filter controls --- */
.filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allows filters to wrap on small screens */
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.filter-option:hover {
    background-color: #f8fafc;
}

.filter-option input {
    margin-right: 0.5rem;
    /* Custom checkbox styling for better looks */
    accent-color: #4169e1;
}

.filter-option label {
    cursor: pointer;
    text-transform: capitalize;
}
