/* General Styles */
body, html {
    height: 100%;
    margin: 0;
    background-color: #121212;
    color: white;
}

body {
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Main Container */
.main { 
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Typography */
h1, h2 {
    text-align: center;
}

h2 {
    margin: 1rem 0;
    font-size: 1.5rem;
    color: #fff;
}

/* Layout Styles */
.idk {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 90%;
    border-radius: 8px;
    overflow: hidden;
}

.leftSide, .ASCII {
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.leftSide {
    border-right: 1px solid white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ASCII Section */
.ASCII {
    padding-left: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    overflow: hidden;
}

.ASCIIContainer {
    height: 90%;
    margin-bottom: 1vh;
    overflow: none;
}

.ASCII h2 {
    text-align: center;
    top: 0;
}

.ASCII pre {
    background-color: #222;
    color: #fff;
    margin-left: 1vh;
    margin-right: 1vh;
    padding: 1vh;
    font-size: 0.5vh;
    border-radius: 4px;
    width: auto;
    max-width: 95%;
    max-height: 90%;
    overflow: auto;
    font-family: monospace;
    text-align: center;
}

/* Upload Section */
.upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 15%;
    border-bottom: 1px solid white;
}

/* Settings Section */
.settings {
    height: 75%;
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.settings h2 {
    text-align: center;
}

.setting {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 1vh;
}

.setting label {
    margin-right: 1vh;
}

/* Not Added File Notification */
#notAddedFile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 98%;
    position: absolute;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    border: red 0.3vh solid;
    border-radius: 2vh;
    background-color: rgba(255, 0, 0, 0.8);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease-in-out, visibility 0s 0.3s;
    overflow: hidden;
}

#notAddedFile.active {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
}

#notAddedFile:not(.active) {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease-in-out, visibility 0s 0s;
}

#notAddedFile h2 {
    color: white;
    font-size: 2vh;
}

/* Convert Button Section */
.convert, .asciiButtons {
    border-top: 1px solid white;
    height: 10%;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.asciiButtons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

#convert, #download, #clipboard {
    background-color: red;
    pointer-events: none;
    margin: 1rem 0;
    padding: 0.8rem 1.5rem;
    color: white;
    border: 1px solid #bbb;
    border-radius: 0.4vh;
    width: 28vh;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

#convert.active, #download.active, #clipboard.active {
    background-color: #121212;
    pointer-events: all;
    transition: 0.3s ease-in-out;
}

#convert:hover, #download:hover, #clipboard:hover {
    background-color: #444;
}

/* File Input Styles */
input[type="file"] {
    margin: 1rem 0;
    padding: 0.5rem;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #333;
    color: white;
    overflow: hidden;
}

/* Styles for settings */

.settingsContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    border-radius: 8px;
    background-color: #1f1f1f;
    border: 1px solid #333;
    box-sizing: border-box;
}

.setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 1rem 0;
}

.setting label {
    color: #fff;
    font-size: 1rem;
    margin-right: 1rem;
    width: 40%;
    text-align: left;
}

.setting input[type="range"] {
    width: calc(100% - 100px);
    background-color: #444;
    border: none;
    border-radius: 4px;
    height: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.setting input[type="range"]:focus {
    outline: none;
    background-color: #666;
}

.setting input[type="range"]::-webkit-slider-runnable-track {
    background-color: #666;
    border-radius: 4px;
    height: 4px;
}

.setting input[type="range"]::-webkit-slider-thumb {
    background-color: #333;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.setting input[type="range"]:hover::-webkit-slider-thumb {
    background-color: #fff;
}

.setting input[type="checkbox"] {
    accent-color: #f00;
    background-color: #333;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.setting select {
    background-color: #333;
    color: white;
    border: 1px solid #bbb;
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.setting select:focus {
    background-color: #444;
}

.setting span {
    color: #fff;
    font-size: 1rem;
    padding-left: 0.5rem;
    width: 50px;
    text-align: center;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background-color: #333;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: #666;
    border-radius: 8px;
    border: 2px solid #444;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #444;
}

::-webkit-scrollbar-button {
    display: none;
}

::-webkit-scrollbar-corner {
    background-color: #333;
}

/* Custom Character Set styles */
#customCharacterSetContainer {
    display: none;
    flex-direction: column;
    position: absolute;
    background-color: rgba(20, 20, 20, 1);
    width: 35%;
    height: 35%;
    overflow: hidden;
    border: 1px white solid;
    border-radius: 2vh;
    align-items: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    h2{
        color: white;
        font-size: 2vh;
        margin: 1vh;
        height: 10%;
    }

    textarea{
        background-color: #333;
        color: white;
        border: 1px solid #bbb;
        border-radius: 4px;
        padding: 0.5rem;
        width: 90%;
        height: 80%;
        margin: 0.5rem;
        font-family: monospace;
    }

    #saveCustomCharacterSet{
        color: white;
        border: 1px solid #bbb;
        border-radius: 4px;
        padding: 0.5rem;
        width: auto; 
        min-width: 10%; 
        height: auto; 
        margin: 0.5rem;
        background-color: red;
        pointer-events: none;
        cursor: not-allowed;
        transition: background-color 0.3s ease;
        white-space: nowrap;
    }

    #saveCustomCharacterSet.canSave{
        background-color: #333;
        pointer-events: all;
        cursor: pointer;
    }
    
    #saveCustomCharacterSet:hover{
        background-color: #444;
    }

    #x{
        color: white;
        top: 0; 
        right: 0;
        position: absolute;
        margin: 1vh;
        border: none;
        background-color: transparent;
        cursor: pointer;    
        font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    }
}

#main.fade{
    opacity: 0.5;
    transition: opacity 0.5s ease-in-out;
}

#customCharacterSetContainer.active{
    display: flex;
    opacity: 1;
}

/* FILE INPUT STYLING */

.fileLabel {
    display: inline-block;
    padding: 10px 20px;
    background-color: black;
    color: white;
    border: 0.2vh solid white;
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
}

.fileLabel:hover {
    background-color: #1f1f1f;
}