:root {
    --header-text-color: #485C6E;
    --color-grey-50: #F1F1F1;
    --color-grey-300: #A0A0A0;
    --color-grey-700: #505050;
}


body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.active-passive-parent-container {
    background-color: var(--color-blue-500);
}

.main-content-wrapper {
    padding: 1.5rem;
}

.content-container {
    /* background-color: white; */
    /* border: 1px solid var(--color-grey-50); */
    /* box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.12); */
    /* overflow: hidden; */
}

.header-title {
    font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
    font-weight: 700;
    color: var(--header-text-color);
}

.header-desc {
    font-size: clamp(0.875rem, 1vw + 0.25rem, 1rem);
    font-weight: 400;
    color: var(--header-text-color);
}


/* Mobile-first approach - Base styles for mobile */
.content-grid {
    /* display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 500px; */

    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    /* min-height: 500px; */
}

.input-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    height: 470px;
}

.info-bar {
    /* Variant 1 */
    background-color: #d2d8e0;

    /* Variant 2 */
    /* background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); */

    
    border-radius: 12px 12px 0 0;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(38, 186, 164, 0.15);
    flex-shrink: 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    /* color: white; */
    color: #757682;
    /* font-weight: 900; */
    white-space: nowrap;
}

/* .info-label {
    font-weight: 500;
    opacity: 0.9;
} */
.info-label {
    position: relative;
    font-weight: 900;
    /* opacity: 0.9; */
    cursor: pointer;
    /* color: #757682; */
    color: #485C6E;

}

/* Animated underline effect */
.info-label::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: currentColor;
    opacity: 0.8;
    transition: width 0.3s ease;
}

.info-label:hover::after {
    width: 100%;
}


.info-value {
    font-weight: 700;

    /* Variant 1 */
    background: rgb(248, 248, 248);
    
    /* Variant 2 */
    /* background: white;
    border: 1px solid #e8e8e8; */

    color: #485C6E;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    min-width: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
}


/* ==========================================================================
   SETTING/CONFIG PANEL
   ========================================================================== */
/* Settings Panel Styles */
.config-panel {
    
    /* Variant 1 */
    background: white;
    border: 1px solid #e9ecef;

    /* Variant 2 */
    /* background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e8e8e8; */

    padding: 5px;
    display: none;
    animation: slideDown 0.3s ease-out;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.config-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.config-panel.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-label {
    font-size: 13px;
    font-weight: 700;
    color: #757682;
    margin-bottom: 0.4rem;
}

/* Show '*' mark in red for required labels */
.form-label.required::after {
    content: " *";
    color: red;
    font-weight: 700;
}

/* Show (Optional) in gray for optional labels */
.form-label.optional::after {
    content: " (Optional)";
    font-weight: 400;
    color: #A0A0A0;
}

.textarea-container {
    position: relative;
    background: white;
    border-radius: 0 0 12px 12px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.textarea-container:focus-within {
    /* border: 1px solid #265BAA; */
}

.text-input {
    width: 100%;
    /* min-height: 300px; */
    padding: 1rem;
    border: none;
    outline: none;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #374151;
    background: transparent;
    border-radius: 0 0 12px 12px;
    
    flex: 1;
    resize: none;
    min-height: 0;
}

/* .text-input:focus {
    border: 1px solid #265BAA;

} */

.text-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* For Firefox */
#text-input {
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 transparent;
}

.btn-secondary {
    border: 1px solid #F1F1F1;
    box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.12);
    width: 2.25rem;
    height: auto;
    background-color: white;
    color: #485C6E;
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: 0.375rem;
    /* optional: subtle rounding */
}

/* Hover state */
.btn-secondary:hover:not(:disabled) {
    background-color: #F9FAFB;
    /* light gray */
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
    border-color: #E5E7EB;
    /* slightly darker border on hover */
}

/* Disabled state */
.btn-secondary:disabled {
    background-color: #F5F5F5;
    color: #A1A1AA;
    border-color: #E5E5E5;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}


.textarea-btns {
    position: absolute;
    top: 0;
    right: 0.8rem;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    height: 100%;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.separator {
    background-color: var(--color-grey-50);
    margin: auto;
    height: 95%;
    display: none;
    width: 0.15rem;
    margin: 0.5;
}

.output-section {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    /* border: 1px solid #e5e7eb; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    /* overflow: hidden; */
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #265BAA, #20a89a);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    /* transform: scaleX(1); */
}

.stat-card:hover {
    /* transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(38, 186, 164, 0.15);
    border-color: #265BAA; */
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #485C6E;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
    word-break: break-all;
    cursor: default;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #757682;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.3;
    cursor: default;
}

/* ==========================================================================
   QUICK EXAMPLES & SAMPLE PILLS
   ========================================================================== */

.quick-examples {
    border-radius: 8px;
    /* margin-top: 0.5rem; */
}

.quick-examples h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #757682;
    margin-bottom: 0.75rem;
}

.sample-pill-container {
    background-color: #FBFBFD;
    border-radius: 8px;
    padding: 0.5rem;
}

.sample-pill {
    background: #FFFFFF;
    border: 1px solid #D3DCE0;
    color: #717171;
    padding: 0.375rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    margin: 0.125rem;
}

.sample-pill:hover {
    background: #ffffffeb;
    color: #334155;
    border-color: #94a3b8;
}




/* ==========================================================================
   RESPONSIVE DESIGN - BREAKPOINTS
   ========================================================================== */

/* Tablet styles */
@media (min-width: 640px) {
    /* .content-grid {
        gap: 1rem;
        min-height: 550px;
    } */

    .info-bar {
        padding: 1rem 1.5rem;
        gap: 1.5rem;
    }

    .info-item {
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .config-row {
        flex-direction: row;
        gap: 20px;
    }

    .info-value {
        padding: 0.25rem 0.75rem;
        min-width: 2.5rem;
    }

    .text-input {
        /* min-height: 350px; */
        padding: 1.25rem;
        font-size: 0.9rem;
    }

    .paste-btn {
        top: 1rem;
        right: 1rem;
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    .output-section {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 1rem 0.8rem;
    }

    .stat-number {
        font-size: 1.75rem;
        margin-bottom: 0.375rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .social-media-bar {
    }
}


@media (min-width: 768px) {
    .config-panel {}

    .config-row {}
}


/* Desktop styles */
@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 1.3fr 1fr;
    }

    .input-section {
        flex: 2;
        max-width: none;
    }

    .separator {
        display: block;
    }

    .output-section {
        flex: 1;
        max-height: 600px;
        padding: 1rem;
    }

    .info-bar {
        padding: 1rem;
        gap: 0.8rem;
    }

    .info-item {
        font-size: 0.875rem;
    }

    .config-panel {
        padding: 0.8rem;
    }

    .text-input {
        /* min-height: 400px; */
        padding: 1rem;
        padding-right: 10%;
        font-size: 1rem;
    }

    .paste-btn {
        top: 1.25rem;
        right: 1.5rem;
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 1.25rem 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

/* Large desktop styles */
@media (min-width: 1280px) {
    /* .content-grid {
        min-height: 650px;
    } */

    .text-input {
        /* min-height: 400px; */
        padding: 1rem;
        padding-right: 8%;
    }

    .output-section {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }
}

/* Handle very large numbers */
@media (max-width: 639px) {
    .stat-number {
        font-size: 1.25rem;
        line-height: 1.1;
    }

    .stat-card {
        padding: 0.875rem 0.625rem;
    }
}

/* Extra handling for numbers with 6+ digits */
.stat-number.large-number {
    font-size: 1.125rem !important;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

/* Animation for number changes */
.stat-number {
    transition: all 0.3s ease;
}

.stat-card:hover .stat-number {
    /* color: #20a89a;
    transform: scale(1.05); */
}

/* Focus states for accessibility */
.text-input:focus {
    background: rgba(38, 186, 164, 0.02);
}

.paste-btn:focus {
    outline: 2px solid #265BAA;
    outline-offset: 2px;
}

/* Loading state (optional) */
.stat-number.loading {
    opacity: 0.6;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}






/* ToDo: No reusable tooltip component as of now, have a reusable component. */
/* Tooltip */
.mode-tooltip-wrapper {
    position: relative;
    /* display: inline-block; */
}

.mode-tooltip-text {
    display: none;
    position: absolute;
    bottom: 180%;
    /* Change from `top` to `bottom` */
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    color: #2F2F2F;
    padding: 8px 8px;
    box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.1),
        0px 8px 24px -2px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-family: Satoshi;
    font-size: 12px;
    font-style: normal;
    font-weight: 400 !important;
    text-align: center;
    max-width: 260px;
    min-width: 200px;
    white-space: normal;
    z-index: 10000;
}

/* Updated tooltip arrow */
.mode-tooltip-text::before {
    content: "";
    position: absolute;
    bottom: -6px;
    /* Adjust for top tooltip */
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: #fff;
    box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.04),
        0px 8px 24px -2px rgba(0, 0, 0, 0.08);
    z-index: -1;
}


/* Show tooltip on hover */
.mode-tooltip-wrapper:hover .mode-tooltip-text {
    display: block;
}

#tooltip-nowrap {
    white-space: nowrap;
}