@font-face {
    font-family: nyt-imperial; 
    src: url('imperial-normal-500.ttf'); 
} 
@font-face {
    font-family: economist; 
    src: url('economist-serif-roman.woff2'); 
} 
@font-face {
    font-family: newRepublic; 
    src: url('newRepublic.woff'); 
}
:root {
    --width: 600px;
}
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    display: flex;
    justify-content: center; /* Centers the container horizontally */
    transition: background-color 1s ease;
}
.container {
    display: grid;
    gap: 20px;
    max-width: 100%;
    min-width: 300px;
    width: 600px;
    margin: 0 auto auto auto;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 5px;
    padding-bottom: 20px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    position: relative;
    transition: background-color 1s ease;
}
#output {
    width: inherit !important;
}
#output div, img, p, span, h1, h2, h3, h4, h5, h6 {
    max-width: var(--width) !important;
    height: auto !important;
}
#header {
    display: grid;
    grid-template-columns: 150px 1fr;
    font-weight: 600;
}
#controlRow {
    font-size: 12px;
}
textarea {
    width: 100%;
    height: 85px;
    display: block;
    font-size: 16px;
    resize: none;
    transition: background-color 1s ease;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}
textarea::-webkit-scrollbar {
    width: 0.5em;
}
textarea::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
    border-radius: 4px;
}
textarea::-webkit-scrollbar-thumb {
    background-color: darkgrey;
    outline: 1px solid slategrey;
    border-radius: 4px;
}
#output {
    font-size: 20px;
    background-color: white;
    border-radius: 8px;     
    transition: background-color 1s ease;
}
.nyt {
    font-family: nyt-imperial, georgia, "times new roman", times, serif;
    line-height: 1.5em;
}
.economist {
    font-family: economist, nyt-imperial, georgia, "times new roman", times, serif;
    line-height: 1.4em;
}
.newRepublic {
    font-family: newRepublic, nyt-imperial, georgia, "times new roman", times, serif;
    line-height: 1.55555555556em;
}
.dont-break-out {
    /* These are technically the same, but use both */
    overflow-wrap: break-word;
    word-wrap: break-word;

    -ms-word-break: break-all;
    /* This is the dangerous one in WebKit, as it breaks things wherever */
    word-break: break-all;
    /* Instead use this non-standard one: */
    word-break: break-word;

    /* Adds a hyphen where the word breaks, if supported (No Blink)
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto; */
}
.controlGridContainer {
    display: flex;
    justify-content: flex-start; /* Align the control buttons to the left */
    align-items: flex-start;     /* Align buttons vertically at the top */
    width: 100%;
    height: 100vh;               /* Make it take the full height of the view */
    position: absolute;          /* Ensure the container is positioned properly */
    top: 0;
    left: 0;
}
.controlGrid {
    display: grid;
    grid-template-columns: 1fr;   /* Single column for vertical stacking */
    gap: 10px;                    /* Spacing between buttons */
    padding: 20px;                /* Padding around the buttons */
}
.controlButton {
    padding: 0px; 
    padding-right: 6px;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s ease;
}
.controlButton:hover {
    color: #555;
}
#closeButton {
    background: none;
    border-radius: 8px;
}
.flux-mode {
    background-color: #f5e6c8 !important;
    color: #3e3b32 !important;
}
.flux-mode-container {
    background-color: #f5e6c8 !important;
}
.flux-mode-textarea {
    background-color: #f5e6c8 !important;
    border-color: #e0d6b5 !important;
}
.flux-mode-select {
    background-color: #f5e6c8 !important;
    color: #3e3b32 !important;
    border-color: #e0d6b5 !important;
}
.dark-mode {
    background-color: #121212 !important;
    color: #d3d3d4 !important;
}
.dark-mode-container {
    background-color: #121212 !important;
}
.dark-mode-textarea {
    background-color: #121212 !important;
    border-color: #333333 !important;
    color: #d3d3d4 !important;
}
.dark-mode-select {
    background-color: #121212 !important;
    color: #d3d3d4 !important;
    border-color: #333333 !important;
}
.resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    background: rgba(0, 0, 0, 0);
    cursor: ew-resize;
}
.resize-handle-left {
    left: -10px;
}
.resize-handle-right {
    right: -10px;
}
select {
    font-family: inherit !important; 
    font-size: revert !important;
    margin: revert !important;
    width: 100px; /* Adjust width as needed */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background-color 1s ease;
}
strong {
    font-weight: 600;
}
/* Styles for phones */
@media only screen and (max-width: 768px) {
    body {
        margin: 10px;
    }
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    /* Add more responsive styles here */
}
.white-space-pre-wrap{
    white-space: pre-wrap;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    overflow: auto; /* allow scroll if popup is taller than viewport */
}

.popup {
    font-size: 12px;
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    width: 225px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    text-align: center;

    max-height: calc(100vh - 30px); /* ensures popup fits within viewport with 15px padding top and bottom */
    overflow-y: auto; /* scroll within popup if content exceeds height */
}

.popup-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.input-field {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
    width: 100%;
}

.spacing{
    height: 5px;
}


#output svg {
    height: 1em;
    vertical-align: -0.175em;
    width: auto; /* Keeps the aspect ratio intact */
}

#copyButton {
    display: none;
}


