/**
 * assets/css/hd-style.css
 * Icosmo Human Design - Unified Premium UI v1.5.0
 *
 * DESIGN RULES:
 * - Full dark neutral design. No random green. No hover colour changes.
 * - Off state: dark background, dark border, dark grey text/icon.
 * - On/Active state: white border, white text/icon.
 * - All buttons and inputs unified to the same height (38px).
 * - Audio player: full-width panel, spectrogram canvas double height,
 *   5-button compact row, volume fader below.
 */

/* --- CORE CONTAINER --- */
#icosmo-hd-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: transparent;
    color: #e0e0e0;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.hd-header {
    text-align: center;
    margin-bottom: 30px;
}

.hd-header h2 {
    font-size: 2.2em;
    color: #f0f0f0;
    margin-bottom: 10px;
}

.hd-header p {
    color: #888;
    font-weight: lighter;
    font-style: italic;
}

/* --- UI GRID (Top Row: Input & Summary) --- */
.hd-ui-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

#icosmo-hd-container .module {
    border: 1px solid #333;
    padding: 20px;
    border-radius: 8px;
    background-color: #141414;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    min-height: 340px;
}

#icosmo-hd-container .control-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
    font-size: 0.85em;
    font-weight: bold;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- COMPACT FORM --- */
.am-compact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.am-row-main, .am-row-geo, .am-row-city {
    display: flex;
    gap: 10px;
}

.am-input-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.am-input-group label {
    font-size: 0.7em;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.am-input-group input,
.am-input-group select {
    background-color: #0d0d0d;
    border: 1px solid #333;
    color: #bbb;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 0.9em;
    width: 100%;
    box-sizing: border-box;
    height: 38px;
}

.date-grp { flex: 2; }
.time-grp { flex: 1.2; }
.tz-grp   { flex: 1; }

.am-bottom-buttons {
    display: flex;
    gap: 10px;
}

/* --- GLOBAL BUTTON BASE --- */
/* All buttons: dark, neutral, same height as inputs */
.button,
#icosmo-hd-container button {
    background-color: #1a1a1a;
    color: #777;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 0 14px;
    height: 38px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: normal;
    transition: color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Active / pressed state for general buttons */
.button:focus,
.button-primary,
#hd-generate-btn {
    background-color: #1a1a1a;
    color: #ccc;
    border-color: #555;
    font-weight: bold;
}

/* ============================================================
   AUDIO PLAYER — Full-width dedicated panel
   ============================================================ */

#hd-audio-player {
    background-color: #141414;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Spectrogram canvas — double height */
.hd-spectrogram-wrapper {
    width: 100%;
    height: 120px;
    background: #080808;
    border-radius: 6px;
    border: 1px solid #222;
    overflow: hidden;
    margin-bottom: 12px;
}

#hd-audio-visualizer {
    display: block;
    width: 100%;
    height: 100%;
}

/* Player controls: one row */
.hd-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Base for all player buttons — override global .button */
.hd-ctrl-btn {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #444;
    cursor: pointer;
    width: 38px;
    height: 38px;
    font-size: 0.8em;
    font-weight: bold;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s ease, border-color 0.15s ease;
    padding: 0;
}

/* Active state — white border + white content */
.hd-ctrl-btn.active {
    border-color: #ffffff;
    color: #ffffff;
}

/* Play button slightly wider for the dashicon */
.hd-play-btn {
    width: 38px;
}

/* Volume control */
.hd-volume-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    margin-left: 8px;
}

.hd-volume-wrap label {
    font-size: 0.65em;
    color: #444;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    flex-shrink: 0;
}

#hd-volume-slider {
    flex: 1;
    cursor: pointer;
    accent-color: #777;
    height: 4px;
}

/* ============================================================
   VISUAL MODULES: MANDALA, BODYGRAPH, REPORT
   ============================================================ */

#hd-mandala-module,
#hd-visual-module,
#hd-report-module {
    background-color: #141414;
    border: 1px solid #333;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.hd-visual-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

#hd-mandala-wrapper,
#hd-bodygraph-wrapper {
    flex: 1.2;
    background: #0a0a0a;
    border-radius: 12px;
    border: 1px solid #222;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

#hd-data-sidebar {
    flex: 1;
    min-width: 350px;
}

/* --- SUMMARY & SIDEBAR BLOCKS --- */
.am-summary-text {
    background-color: #181818;
    padding: 25px;
    border-radius: 8px;
    line-height: 1.7;
    font-size: 1.05em;
    border-left: 4px solid #444;
    color: #bbb;
}

.am-summary-text h4 {
    margin-top: 0;
    font-size: 1.3em;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

#hd-data-sidebar .am-sig-label { color: #555 !important; text-transform: uppercase; font-size: 0.8em; }
#hd-data-sidebar .gate-number  { font-weight: bold; }
#hd-data-sidebar .value-text   { color: #ffffff !important; }

.color-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 8px;
}

/* --- MASTER REPORT TABLE --- */
.table-wrapper {
    overflow-x: auto;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
}

.oracle-table {
    border-collapse: collapse;
    width: 100%;
    background-color: #181818;
}

.oracle-table th,
.oracle-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #222;
    font-size: 0.9em;
}

.oracle-table th {
    background-color: #1e1e1e;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75em;
    position: sticky;
    top: 0;
    z-index: 5;
}

.oracle-table tr:hover { background-color: #1e1e1e; }

.symbol {
    font-family: "Segoe UI Symbol", "Apple Symbols", "Arial Unicode MS", sans-serif;
}

/* --- MANDALA SCALING --- */
#hd-mandala-wrapper svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.5));
}

/* Status text */
.status-text {
    color: #666;
    font-size: 0.9em;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 1050px) {
    .hd-ui-grid      { grid-template-columns: 1fr; }
    .hd-visual-flex  { flex-direction: column; }
    #hd-bodygraph-wrapper { width: 100%; min-height: auto; }
    #hd-data-sidebar { width: 100%; min-width: 0; }
}

@media (max-width: 700px) {
    .am-row-main, .am-row-geo, .am-row-city, .am-bottom-buttons {
        flex-direction: column;
    }
    .hd-player-controls { flex-wrap: wrap; }
    .hd-volume-wrap     { width: 100%; margin-left: 0; }
}
