/* ======================
   BOND DETAIL SIDE PANEL STYLES
   ====================== */

/* ======================
   ANIMATED RATING CHART STYLES
   ====================== */
.animated-rating-chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem auto;
    position: relative;
    overflow: hidden;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    max-width: 160px;
    min-height: 160px;
}

.rating-chart {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
}

.rating-chart text {
    font-family: 'Manrope', sans-serif;
    user-select: none;
}

/* Add hover effect to the chart */
.rating-chart:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Rating-specific container styling */
.animated-rating-chart-container.aaa { border-color: rgba(0, 204, 68, 0.3); }
.animated-rating-chart-container.aa { border-color: rgba(136, 204, 0, 0.3); }
.animated-rating-chart-container.a { border-color: rgba(179, 204, 0, 0.3); }
.animated-rating-chart-container.bbb { border-color: rgba(255, 204, 0, 0.3); }
.animated-rating-chart-container.bb { border-color: rgba(255, 153, 0, 0.3); }
.animated-rating-chart-container.b { border-color: rgba(255, 102, 0, 0.3); }
.animated-rating-chart-container.ccc { border-color: rgba(255, 51, 0, 0.3); }
.animated-rating-chart-container.cc { border-color: rgba(255, 17, 0, 0.3); }
.animated-rating-chart-container.c { border-color: rgba(238, 0, 0, 0.3); }
.animated-rating-chart-container.d { border-color: rgba(204, 0, 0, 0.3); }

/* Add subtle glow effect based on rating */
.animated-rating-chart-container.aaa .rating-chart { box-shadow: 0 0 10px rgba(0, 204, 68, 0.2); }
.animated-rating-chart-container.aa .rating-chart { box-shadow: 0 0 10px rgba(136, 204, 0, 0.2); }
.animated-rating-chart-container.a .rating-chart { box-shadow: 0 0 10px rgba(179, 204, 0, 0.2); }
.animated-rating-chart-container.bbb .rating-chart { box-shadow: 0 0 10px rgba(255, 204, 0, 0.2); }
.animated-rating-chart-container.bb .rating-chart { box-shadow: 0 0 10px rgba(255, 153, 0, 0.2); }
.animated-rating-chart-container.b .rating-chart { box-shadow: 0 0 10px rgba(255, 102, 0, 0.2); }
.animated-rating-chart-container.ccc .rating-chart { box-shadow: 0 0 10px rgba(255, 51, 0, 0.2); }
.animated-rating-chart-container.cc .rating-chart { box-shadow: 0 0 10px rgba(255, 17, 0, 0.2); }
.animated-rating-chart-container.c .rating-chart { box-shadow: 0 0 10px rgba(238, 0, 0, 0.2); }
.animated-rating-chart-container.d .rating-chart { box-shadow: 0 0 10px rgba(204, 0, 0, 0.2); }

/* Overlay */
.bond-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bond-detail-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Side Panel */
.bond-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    height: 100vh;
    background-color: #000;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.bond-detail-panel.show {
    transform: translateX(0);
}

/* Panel Content Container */
.panel-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Close Button */
.panel-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 24px;
    height: 24px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.panel-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Panel Header */
.panel-header {
    padding: 0.8rem 1rem;
    padding-top: 2.2rem; /* Space for close button */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.bond-detail-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: lowercase;
    margin-bottom: 0.1rem;
}

.bond-detail-subtitle {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: capitalize;
    margin-bottom: 0.6rem;
}

/* Quick Highlight */
.quick-highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.highlight-item {
    flex: 1;
}

.highlight-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.05rem;
}

.highlight-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.highlight-divider {
    width: 1px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Scrollable Sections Container */
.panel-sections {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.6rem 1rem;
    padding-bottom: 140px; /* Space for yield module + action buttons */
}

/* Section Styles */
.detail-section {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 0.4rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.detail-section.expanded {
    background-color: rgba(255, 255, 255, 0.03);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.section-header:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: lowercase;
    margin: 0;
}

.section-toggle-icon {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
}

.section-content {
    padding: 0 0.6rem 0.6rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Basic Details Container */
.basic-details-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Basic Details Grid */
.basic-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.detail-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.detail-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

/* Security Info */
.security-info {
    font-size: 0.7rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.6rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
    margin-top: 0.4rem;
}

/* Coupon Details */
.coupon-details-text {
    font-size: 0.7rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    white-space: pre-line;
}

/* Past Trades */
.past-trades-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.trade-item {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr 0.8fr;
    align-items: center;
    padding: 0.4rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
    font-size: 0.7rem;
}

.trade-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.65rem;
}

.trade-price {
    font-weight: 600;
    text-align: right;
    font-size: 0.75rem;
}

.trade-yield {
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
    font-size: 0.7rem;
}

.trade-volume {
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    font-size: 0.65rem;
}

/* Performance Container */
.performance-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Exchange Toggle Buttons */
.exchange-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.exchange-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exchange-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.exchange-btn.active {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.exchange-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.3);
}

.exchange-btn.disabled:hover {
    background-color: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.3);
    transform: none;
}

/* Market Data Grid */
.market-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1.5rem;
}

.market-data-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.data-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.data-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

/* Order Book Container */
.order-book-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.order-book-side {
    display: flex;
    flex-direction: column;
}

.order-book-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: #fff;
}

.order-book-title span {
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
}

.bid-side .order-book-table {
    border: 1px solid rgba(0, 255, 136, 0.3);
    background-color: rgba(0, 255, 136, 0.02);
}

.ask-side .order-book-table {
    border: 1px solid rgba(255, 68, 68, 0.3);
    background-color: rgba(255, 68, 68, 0.02);
}

.order-book-table {
    border-radius: 3px;
    overflow: hidden;
}

.order-book-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.4rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.05);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.order-book-header span {
    text-align: center;
}

.order-book-header span:first-child {
    text-align: left;
}

.order-book-header span:last-child {
    text-align: right;
}

.order-book-rows {
    display: flex;
    flex-direction: column;
}

.order-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.order-row:last-child {
    border-bottom: none;
}

.order-row span {
    text-align: center;
}

.order-row span:first-child {
    text-align: left;
}

.order-row span:last-child {
    text-align: right;
}

.order-book-total {
    padding: 0.4rem 0.6rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gold Tracker */
.gold-tracker {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.gold-price-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.6rem;
    background-color: rgba(255, 183, 77, 0.05);
    border: 1px solid rgba(255, 183, 77, 0.2);
    border-radius: 3px;
}

.current-gold-price,
.gold-change {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.current-gold-price .label,
.gold-change .label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.current-gold-price .value,
.gold-change .value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.gold-change .value.positive {
    color: #00ff88;
}

.gold-change .value.negative {
    color: #ff4444;
}

/* Enhanced Gold Tracker Styles */
.gold-price-header {
    margin-bottom: 0.8rem;
}

.gold-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.2rem 0;
}

.gold-type-info {
    font-size: 0.65rem;
    color: rgba(255, 183, 77, 0.8);
    font-weight: 500;
}

.gold-price-main {
    background-color: rgba(255, 183, 77, 0.05);
    border: 1px solid rgba(255, 183, 77, 0.2);
    border-radius: 4px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
}

.current-price-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.price-per-gram,
.price-per-10gram {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-per-gram .label,
.price-per-10gram .label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.price-per-gram .value,
.price-per-10gram .value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.gold-changes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.change-item {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    padding: 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.change-item .period {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    font-weight: 500;
}

.change-item .change-value {
    font-size: 0.75rem;
    font-weight: 600;
}

.change-item .change-value.positive {
    color: #00ff88;
}

.change-item .change-value.negative {
    color: #ff4444;
}

.gold-data-info {
    text-align: center;
}

.gold-data-info .data-date {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.gold-error-state {
    text-align: center;
    padding: 1rem;
    background-color: rgba(255, 77, 77, 0.05);
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: 4px;
}

.gold-error-state .error-message {
    font-size: 0.75rem;
    color: rgba(255, 77, 77, 0.8);
    display: block;
    margin-bottom: 0.6rem;
}

.gold-error-state .retry-button {
    background-color: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ff4444;
    padding: 0.4rem 0.8rem;
    border-radius: 3px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gold-error-state .retry-button:hover {
    background-color: rgba(255, 77, 77, 0.15);
    border-color: rgba(255, 77, 77, 0.4);
}

.loading-state {
    text-align: center;
    padding: 1rem;
}

.loading-state .loading-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.gold-chart {
    height: 100px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
}

/* Notes List */
.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.note-item {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.4rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
}

.note-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.4);
}

.rating-notes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rating-note-item {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.rating-note-item::before {
    content: '•';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.4);
}

/* Risk & Rating Container */
.risk-rating-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.rating-description {
    font-size: 0.7rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    white-space: pre-line;
}

.rating-scale-intro {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
}

/* Rating Scale Container */
.rating-scale-container {
    padding: 1rem 0.8rem;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 0.5rem 0;
}

.rating-scale {
    display: flex;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.8rem;
    position: relative;
}

.rating-segment {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 1px solid rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.rating-segment:last-child {
    border-right: none;
}

/* Gradient background for filled segments */
.rating-segment:first-child.filled {
    background-color: rgba(0, 255, 136, 0.2);
}

.rating-segment:nth-child(2).filled {
    background-color: rgba(76, 255, 136, 0.2);
}

.rating-segment:nth-child(3).filled {
    background-color: rgba(152, 255, 136, 0.2);
}

.rating-segment:nth-child(4).filled {
    background-color: rgba(255, 235, 59, 0.2);
}

.rating-segment:nth-child(5).filled {
    background-color: rgba(255, 193, 7, 0.2);
}

.rating-segment:nth-child(6).filled {
    background-color: rgba(255, 152, 0, 0.2);
}

.rating-segment:nth-child(7).filled {
    background-color: rgba(255, 87, 34, 0.2);
}

.rating-segment:nth-child(8).filled {
    background-color: rgba(244, 67, 54, 0.2);
}

.rating-segment.active {
    background-color: #fff !important;
    color: #000;
    transform: scale(1.1);
    z-index: 1;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.rating-segment.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
}

.rating-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.rating-segment.active .rating-label {
    color: #000;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.3rem;
}

.scale-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Rating Details */
.rating-details-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rating-detail {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.6rem;
}

.rating-detail:last-child {
    border-bottom: none;
}

.rating-detail-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.rating-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.rating-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
}

.rating-detail-description {
    font-size: 0.65rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
}

/* Alternative Modern Rating Display */
.rating-chips {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin: 0.8rem 0;
}

.rating-chip {
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.rating-chip.active {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.rating-chip.passed {
    background-color: rgba(0, 255, 136, 0.1);
    color: rgba(0, 255, 136, 0.8);
    border-color: rgba(0, 255, 136, 0.3);
}

/* Alternative: Rating Badge Style */
.rating-badge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.rating-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.rating-badge.aaa {
    background-color: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.5);
}

.rating-badge.aa {
    background-color: rgba(76, 255, 136, 0.1);
    border-color: rgba(76, 255, 136, 0.5);
}

.rating-badge.a {
    background-color: rgba(152, 255, 136, 0.1);
    border-color: rgba(152, 255, 136, 0.5);
}

.rating-badge.bbb {
    background-color: rgba(255, 235, 59, 0.1);
    border-color: rgba(255, 235, 59, 0.5);
}

.badge-rating {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.badge-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.2rem;
}

.rating-progress {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 68, 68, 1) 0%, 
        rgba(255, 235, 59, 1) 50%, 
        rgba(0, 255, 136, 1) 100%);
    transition: width 0.3s ease;
}

/* Fundamentals Grid */
.fundamentals-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.fundamental-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.fundamental-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.fundamental-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

/* Liquidity Score */
.liquidity-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
}

.score-display {
    text-align: center;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.1rem;
}

.score-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.score-description {
    text-align: center;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.liquidity-details {
    font-size: 0.7rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
    white-space: pre-line;
    text-align: left;
    width: 100%;
    margin-top: 0.5rem;
}

/* Top Investors */
.top-investors-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.investor-item {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.investor-rank {
    width: 20px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
}

.investor-name {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
}

.investor-holding {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

/* Similar Bonds */
.similar-bonds-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.similar-bond-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.similar-bond-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.similar-bond-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
}

.similar-bond-yield {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
}

.similar-bond-price {
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

/* Company Info */
.company-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.company-description {
    font-size: 0.7rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.company-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.company-detail .label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.company-detail .value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

/* Taxation Info */
.taxation-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tax-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.6rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.tax-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
}

.tax-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

/* Company Info */
.company-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.company-description {
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.company-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.company-detail .label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.company-detail .value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

/* Taxation Info */
.taxation-info {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tax-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.8rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.tax-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.tax-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

/* Action Buttons */
.panel-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    background-color: rgba(0, 0, 0, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.action-button {
    flex: 1;
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: lowercase;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Manrope', sans-serif;
}

.buy-button {
    background-color: #fff;
    color: #000;
}

.buy-button:hover {
    background-color: #e6e6e6;
}

.sell-button {
    background-color: transparent;
    color: #fff;
    border: 1.5px solid #404040;
}

.sell-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Watchlist Button */
.watchlist-button {
    flex: 0 0 auto;
    width: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1.5px solid #404040;
}

.watchlist-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.watchlist-button.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.watchlist-button svg {
    width: 18px;
    height: 18px;
    transition: all 0.2s ease;
}

.watchlist-button.active svg {
    transform: scale(1.1);
}

/* Scrollbar Styling */
.panel-sections::-webkit-scrollbar {
    width: 4px;
}

.panel-sections::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.panel-sections::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.panel-sections::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 600px) {
    .bond-detail-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .panel-header {
        padding: 1rem;
        padding-top: 2.5rem;
    }
    
    .panel-sections {
        padding: 0.6rem 1rem;
        padding-bottom: 140px;
    }
    
    .quick-highlight {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.5rem 0.6rem;
    }
    
    .highlight-divider {
        width: 40px;
        height: 1px;
    }
    
    .performance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trade-item {
        grid-template-columns: 1fr 1fr;
        gap: 0.2rem;
        font-size: 0.65rem;
    }
    
    .trade-yield,
    .trade-volume {
        grid-column: span 1;
    }
    
    .panel-actions {
        padding: 0.8rem 1rem;
    }
    
    .action-button {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Available Yield & Price Module */
.available-yield-price-module {
    position: absolute;
    bottom: 70px; /* Above the action buttons with more space */
    left: 0;
    right: 0;
    padding: 0.8rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 5;
    min-height: auto; /* Ensure module can expand */
    max-height: none; /* Remove any height restrictions */
    overflow: visible; /* Ensure content is not clipped */
}

.yield-price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 0.5rem;
}

.yield-price-row:last-child {
    margin-bottom: 0;
}

.yield-price-item {
    flex: 1;
}

.yield-price-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.05rem;
}

.yield-price-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
}

.yield-price-divider {
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .yield-price-row {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.5rem 0.6rem;
    }

    .yield-price-divider {
        width: 40px;
        height: 1px;
    }
}

/* ======================
   NOTE TAGS - Smaller version for bond detail panel
   ====================== */
.bond-detail-panel .note-tag {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 500;
    padding: 0.08rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.4rem;
    text-transform: none;
    letter-spacing: 0.2px;
    vertical-align: middle;
}

.bond-detail-panel .tag-important,
.bond-detail-panel .tag-imp {
    background-color: rgba(147, 51, 234, 0.2) !important;
    color: #9333ea !important;
    border: 1px solid rgba(147, 51, 234, 0.3) !important;
}

.bond-detail-panel .tag-new {
    background-color: rgba(251, 146, 60, 0.2) !important;
    color: #fb923c !important;
    border: 1px solid rgba(251, 146, 60, 0.3) !important;
}

.bond-detail-panel .tag-info {
    background-color: rgba(77, 150, 255, 0.2) !important;
    color: #4d96ff !important;
    border: 1px solid rgba(77, 150, 255, 0.3) !important;
}

.bond-detail-panel .note-item {
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* ======================
   HIGHLIGHT VALUES - For coupon details and other highlighted text
   ====================== */
.bond-detail-panel .highlight-value {
    color: #ffffff;
    font-weight: 600;
}

/* ======================
   VIEW FULL DETAILS LINK
   ====================== */
.panel-full-details-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    margin: 0 0.8rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4FC3F7;
    text-decoration: none;
    border: 1px solid rgba(79, 195, 247, 0.2);
    border-radius: 8px;
    background: rgba(79, 195, 247, 0.06);
    transition: all 0.2s ease;
    text-transform: lowercase;
}
.panel-full-details-link:hover {
    background: rgba(79, 195, 247, 0.12);
    border-color: rgba(79, 195, 247, 0.4);
    transform: translateX(2px);
}
.panel-full-details-link svg {
    transition: transform 0.2s ease;
}
.panel-full-details-link:hover svg {
    transform: translateX(3px);
}