/* panels-astro.css */
/* Styles for Astro Matrix ID input and results panels */

/*
 * LOG-BOOK
 * 2025-06-12: Added a general .constellation-symbol class.
 *             - Problem: Zodiac symbols were not rendering with their correct colors in all places,
 *               particularly on the canvas-based Radix chart. This was due to the default font
 *               (Arial or Courier New) causing the browser to fall back to a default emoji-style
 *               rendering which ignores color settings.
 *             - Solution: Created this general-purpose class to define a font-family stack
 *               that is known to support colorable glyphs for these symbols across different
 *               operating systems. This class will be used for all zodiac symbols to ensure
 *               they are rendered correctly, allowing their dynamically assigned colors to appear.
 */
.constellation-symbol {
    font-family: "Segoe UI Symbol", "Apple Symbols", sans-serif;
    font-size: 1.5em; /* A good default size, can be overridden */
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    min-width: 1em;
    /* Color is applied via inline style from JS */
}


/* Astro Input Panel Styles */
.astro-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px; 
    margin-bottom: 5px; 
}
.astro-input-row {
    display: flex;
    flex-wrap: nowrap; 
    gap: 8px; 
    align-items: flex-end; 
}
.astro-input-field-container {
    flex: 1 1 0; 
    min-width: 0; 
    display: flex;
    flex-direction: column;
}
.astro-input-field-container .control-group-label {
    margin-bottom: 3px; 
    font-size: calc(var(--font-size-label) * 0.95); 
}
input[type="date"].astro-date-time-input,
input[type="time"].astro-date-time-input,
input.astro-location-input { 
    background-color: #111111;
    color: #cccccc;
    border: 1px solid #999999;
    padding: 4px 6px;
    font-size: var(--font-size-input-text);
    font-weight: normal;
    border-radius: 3px;
    box-sizing: border-box;
    width: 100%;
    height: calc(var(--font-size-input-text) + 10px + 2px); 
    line-height: normal;
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: textfield; 
}
input[type="date"].astro-date-time-input::-webkit-calendar-picker-indicator,
input[type="time"].astro-date-time-input::-webkit-calendar-picker-indicator {
    filter: invert(0.8); 
    cursor: pointer;
}
.astro-input-footnote {
    font-size: 0.7em;
    color: #aaa;
    margin-top: 2px; 
    text-align: left;
    display: block;
}

/*
 * LOG-BOOK
 * 2025-06-08: Modified Radix Chart styles to reflect its new panel structure.
 *             The container is now inside the `#astro-chart-module-placeholder` module.
 *             The canvas is now set to take 100% width of its container to be more responsive
 *             within the new, potentially narrower, panel layout.
 */
#astro-chart-module-placeholder #radix-chart-container {
    width: 100%; 
    margin-top: 5px;
    margin-left: auto;
    margin-right: auto;
    background-color: transparent !important; 
    border: none !important;                  
    padding: 0 !important; 
    box-sizing: border-box;
    display: flex; 
    justify-content: center; 
    align-items: center;
}
#astro-chart-module-placeholder #radixCanvas {
    display: block;
    width: 100% !important; 
    max-width: 300px; /* Set a max-width to prevent it from becoming too large */
    height: auto !important;   
    margin: 0 auto !important; 
    border-radius: 5px; 
}


/* Astro Results Panel Styles */
#astro-results-content .astro-result-section { 
    margin-bottom: 12px; 
}
#astro-results-content .astro-result-section > h4:not(#derived-keys-heading) { 
    font-size: 0.9em;
    color: #cccccc;
    border-bottom: 1px solid #4f4f4f;
    padding-bottom: 3px;
    margin-bottom: 8px; 
    line-height: 1.2; 
}
.astro-derived-header {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid #4f4f4f; 
    padding-bottom: 3px;             
    margin-bottom: 8px;              
}
.astro-derived-header h4#derived-keys-heading { 
    font-size: 0.9em;
    color: #cccccc;
    line-height: 1.2; 
    margin-bottom: 0 !important; 
    border-bottom: none !important; 
    padding-bottom: 0 !important;
    flex-grow: 1; 
}
.astro-derived-header .heading-controls-right { 
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
select.astro-scale-select-inline { 
    max-width: 160px; 
    min-width: 120px;
    font-size: calc(var(--font-size-input-text) * 0.85); 
    height: calc(var(--font-size-input-text) + 6px + 2px); 
    padding: 2px 4px;
}

table.astro-results-table { 
    font-size: 0.8em; 
    width: 100%;
    border-collapse: collapse;
}
#harmonic-aspects-table.astro-results-table th {
    text-align: left;
    padding: 3px 4px;
    border: 1px solid #444444;
    background-color: #3a3a3a; 
    font-weight: bold;
    font-size: 0.9em;
}
#harmonic-aspects-table.astro-results-table td {
    padding: 2px 4px; 
    border: 1px solid #444444; 
    font-weight: lighter;
    color: #cccccc;
    vertical-align: middle;
}
#harmonic-aspects-table.astro-results-table tr:nth-child(even) td { 
    background-color: #2c2c2c; 
}
#harmonic-aspects-table.astro-results-table td:nth-child(1) { 
    text-align: right; padding-right: 6px; white-space: nowrap;
    font-size: 1.05em; width: auto; 
}
#harmonic-aspects-table.astro-results-table td:nth-child(2) { text-align: right; width: 50px; white-space: nowrap; }
#harmonic-aspects-table.astro-results-table td:nth-child(3) { text-align: center; width: 45px; white-space: nowrap; }
#harmonic-aspects-table.astro-results-table td:nth-child(4) { text-align: left; }
.planet-symbol { font-weight: normal; display:inline-block; margin: 0 1px; }

#derived-colors-list.colors-display-flex { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.derived-key-color-box { 
    width: 28px; height: 28px; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85em; font-weight: bold; border: 1px solid #222;
    cursor: default; line-height: 28px; box-sizing: border-box;
    text-shadow: 0 0 1px rgba(0,0,0,0.3); 
}

@media (max-width: 600px) {
    .astro-input-row { flex-direction: column; align-items: stretch; }
    .astro-input-field-container { width: 100%;}
    #astro-chart-module-placeholder #radixCanvas { width: 90% !important; /* Can be a bit wider on very small screens */ }
    .derived-key-color-box { width: 24px; height: 24px; line-height: 24px; font-size: 0.75em;}
    #harmonic-aspects-table.astro-results-table { font-size: 0.75em; }
    .astro-derived-header { flex-direction: column; align-items: flex-start; gap: 5px; border-bottom: 1px solid #4f4f4f; padding-bottom: 5px; margin-bottom: 8px; }
    .astro-derived-header h4#derived-keys-heading { border-bottom: none; }
    select.astro-scale-select-inline { margin-left: 0; width: 100%; max-width: none; }
}
