/**
 * Unlock Modal Styles for Brand Chart Shortcodes
 * Copied from facteus-data-insights plugin
 */

/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Chart Card Styles */
.brand-chart-card,
.chart-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 1px 1px 12px rgb(0 0 0 / 11%);
    padding: 0.8rem 1rem;
    transition: box-shadow 0.3s ease;
    flex: 0 1 auto;
    width: 100%;
    position: relative;
    transition: all 0.4s ease-in-out;
    font-family: 'Poppins', sans-serif;
}

/* Chart Card Heading Styles */
.brand-chart-card h3,
.chart-card h3 {
    font-weight: 300 !important;
    font-size: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
    color: #888888;
    font-family: 'Poppins', sans-serif;
}

/* Specific styling for brand insight page contexts */
.brand_insight .brand-chart-card h3,
.brand_insight .chart-card h3,
.industry_insight .brand-chart-card h3,
.industry_insight .chart-card h3,
.macro_sector .brand-chart-card h3,
.macro_sector .chart-card h3 {
    font-weight: 300 !important;
    margin-bottom: 0.2rem;
}

.brand-chart-card h4,
.chart-card h4 {
    text-transform: uppercase;
    margin-top: 0.1rem;
    margin-bottom: 0.2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

/* Short description styling */
.brand-chart-card p.short-desc,
.chart-card p.short-desc {
    position: relative;
    margin-left: 0.7rem;
    color: #555555;
    margin-top: -0.1rem;
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 2rem;
    display: inline-block;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

.short-desc::before {
    position: absolute;
    content: '';
    display: block;
    z-index: 0;
    left: -0.5rem;
    top: 15%;
    height: 70%;
    margin-top: 0;
    width: 2px;
    border-radius: 10rem;
    background: #d000bc80;
}

/* Chart actions styling - positioned top-right, aligned with title */
.chart-actions {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    display: flex;
    justify-content: flex-end;
    z-index: 10;
}

.chart-actions-right {
    display: flex;
    gap: 0.5rem;
}

.chart-export-btn,
.chart-zoom-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-export-btn:hover,
.chart-zoom-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.chart-export-btn svg,
.chart-zoom-btn svg {
    width: 1rem;
    height: 1rem;
    fill: #666;
}

.chart-container {
    height: 400px;
    width: 100%;
    margin-top: 0.5rem;
}

/* Unlock data widget styles - matches original brand-insight-charts.css */
.chart-container .unlock-data-wrapper {
    position: absolute;
    right: 2vw;
    width: 32%;
    height: auto;
    z-index: 100;
    top: 10rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-width: 8rem;
    transition: all 0.2s ease-in-out;
}

.chart-container .unlock-data-wrapper::before {
    content: '';
    display: block;
    position: absolute;
    right: 0;
    left: -1rem;
    bottom: -1rem;
    top: -1rem;
    background: linear-gradient(90deg, rgb(255 255 255 / 20%) 0%, rgb(255 255 255 / 93%) 30%);
    z-index: -1;
    border-radius: 0.3rem;
    opacity: 1;
}

.unlock-data-inner {
    position: relative;
    width: 100%;
    display: flex;
    flex-flow: column nowrap;
    padding: 0.3rem;
    top: 6.7rem;
    justify-content: center;
    align-items: center;
}

.unlock-cta {
    display: inline;
    text-decoration: none !important;
}

.unlock-data-wrapper .circle {
    position: relative;
    background-color: transparent;
    width: 3rem;
    height: 3rem;
    opacity: 0.8;
    border-radius: 100%;
    margin-left: -1.5rem;
    margin-top: -1.5rem;
    display: block;
    z-index: 0;
    left: 50%;
    text-align: center;
}

.unlock-data-wrapper svg {
    width: 2rem;
    height: 2.5rem;
    z-index: 1;
}

.unlock-data-wrapper svg path {
    fill: #9374cc;
    transition: all 0.2s ease-in-out;
}

.unlock-cta:hover svg path {
    fill: #5f03dc;
    transition: all 0.2s ease-in-out;
}

.unlock-cta .current-qtr {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    text-align: center;
    color: #a990d7;
    transition: all 0.2s ease-in-out;
    font-weight: 600;
}

.unlock-cta:hover .current-qtr {
    color: #5f03dc;
    transition: all 0.2s ease-in-out;
}

a.flyout {
    max-height: 0;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    height: 0;
    text-align: center;
    box-shadow: 0px 0px 12px -4px rgb(0 0 0 / 40%);
    /* padding: 0.6rem; */
    width: 11.5rem;
    background: transparent;
    border-radius: 2rem;
    text-decoration: none;
    top: 0px;
    position: relative;
    background-image: linear-gradient(90deg, #FE01B4 0%, var(--e-global-color-38b2893) 100%);
    color: #fff;
    display: flex
;
    justify-content: center;
    align-items: center;
    text-decoration: none !important;
    opacity: 0;
    margin-top: 0.5rem;
}

a.flyout:hover {
    color: #fff;
}

.flyout > span {
    display: block;
    white-space: nowrap;
}

.unlock-cta:hover + .flyout,
a.flyout:hover {
    max-height: 10rem;
    transition: all 0.2s ease-in-out;
    height: 3rem;
    opacity: 1;
}

a.flyout:active {
    top: 1px;
    transition: all 0.2s ease-in-out;
}

.unlock-data-wrapper a.flyout, 
.unlock-data-wrapper a.flyout:hover, 
.unlock-data-wrapper a.flyout:visited, 
.unlock-data-wrapper a.flyout:active, 
.unlock-data-wrapper a.flyout span, 
.unlock-data-wrapper a.flyout .link-text {
    color: #fff !important;
}

.link-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.unlock-cta:hover .circle {
    background-color: transparent;
}

/* Registration Modal Styles */
.registration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.registration-modal.active {
    opacity: 1;
    visibility: visible;
}

.registration-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1;
    pointer-events: none;
}

.registration-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 2;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.registration-modal.active .registration-modal-content {
    transform: translateY(0);
}

.registration-modal-header {
    display: flex;
    justify-content: center;
    padding: 15px;
    border-bottom: 1px solid #eaeaea;
}

.registration-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.registration-modal-body {
    padding: 20px;
}

#hubspot-form-container .hs-form {
    font-family: inherit;
}

body.modal-open {
    overflow: hidden;
}

.floater {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.floater.active {
    transform: scale(1);
    opacity: 1;
}

.floater h2 {
    margin-bottom: 1rem;
    color: #333;
}

.get-access-tag {
    margin-bottom: 1.5rem;
    color: #666;
}

@media (max-height: 600px) {
    .registration-modal-content {
        max-height: 85vh;
    }
}

/* Sunburst Custom Legend - Responsive Grid Layout */
.sunburst-custom-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 15px;
    padding: 12px;
    font-size: 11px;
    color: #666;
    justify-items: start;
}

.sunburst-custom-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
    min-width: 0; /* Allow text truncation */
}

.sunburst-custom-legend .legend-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sunburst-custom-legend .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sunburst-custom-legend .legend-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile: Stack vertically */
@media (max-width: 767px) {
    .sunburst-custom-legend {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }
    
    .sunburst-custom-legend .legend-item {
        justify-self: stretch;
    }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .sunburst-custom-legend {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Desktop: Auto-fit with min 140px */
@media (min-width: 1024px) {
    .sunburst-custom-legend {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}


