﻿/* Container for the dynamic card */
.dynamic-info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 1000px;
    margin: 2rem auto;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Grid layout for 64 hexagrams */
.hexagram-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding: 10px;
    max-height: 230px;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #f8fafc;
}

/* Individual Radio Item Styling */
.form-check {
    vertical-align: top;
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

    .form-check:hover {
        border-color: #3182ce;
        background: #ebf8ff;
        transform: translateY(-1px);
    }


.ai-button {
    font-size: large;
    font: bold;
    margin: 50px;
    font-size: large;
    font: bold;
    background-color: blue;
    color: white !important;
    padding: 10px 30px 10px 30px;
    border-radius: 10px;
}
/* Hide the default radio but keep it functional */
.form-check-input {
    cursor: pointer;
    margin-right: 10px;
}

/* Checked State Styling */
.form-check:has(.form-check-input:checked) {
    border-color: #2b6cb0;
    background: #bee3f8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Typography */
.form-check-label {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    width: 100%;
}

.chinese-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.english-name {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 2px;
}

/* Submit Button styling */
.btn-primary {
    background-color: blue; /* Deep Strategic Blue */
    border: none;
    color: white !important;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Custom Scrollbar for the container */
.hexagram-container::-webkit-scrollbar {
    width: 6px;
}

.hexagram-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.hexagram-yao-container {
    display: flex;
    align-items: stretch;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    width: fit-content;
}

/* Sidebar Column */
.trigram-sidebar {
    display: flex;
    flex-direction: column;
    margin-right: 20px;
    border-right: 1px solid #e2e8f0;
}

.trigram-block {
    flex: 1; /* Each block takes exactly 50% height (3 yaos) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

    .trigram-block.outer {
        border-bottom: 1px dashed #cbd5e0; /* Visual split between top and bottom */
    }

.trigram-text {
    /* writing-mode: vertical-rl;  Optional: vertical text for a classic look */
    text-orientation: mixed;
    font-weight: bold;
    color: #4a5568;
    font-size: 1rem;
    width: 80px;
}

/* Yao Stack Column */
.yao-display {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Consistency in spacing is vital for alignment */
}

.yao-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.yao {
    height: 12px;
    width: 100px;
    display: flex;
    justify-content: space-between;
}

    .yao .segment {
        background-color: #1a202c;
        height: 100%;
    }

    .yao.yang .segment {
        width: 100%;
    }

    .yao.yin .segment {
        width: 46%;
    }


.img-info-link {
    display: inline-block;
    width: 18px; /* Width of your image */
    height: 18px; /* Height of your image */
    background-image: url('/img/info.jpg');
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

    .img-info-link:hover {
        transform: scale(1.05); /* Interactive effect */
    }

/* Initial state: Hidden by default */
.yao_notes {
    display: none;
    padding: 15px;
    background-color: #f8fafc;
    border-left: 4px solid #2d3748;
    margin-top: 10px;
}

.yao-notes-hide {
    display: none !important;
}

.yao-notes-show {
    display: block !important;
    text-align: left !important;
}

.line-idx {
    cursor: pointer;
    font-size: 0.6rem;
    color: #a0aec0;
}