/* Try It Editor Styles */
.try-it-editor-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 90vh;
    overflow: hidden;
    border: 1px solid #ddd;
    background: #f0f0f0;
    margin-bottom:20px;
    gap: 10px;
    padding: 0px 10px 0px 10px;
}

.editor-column {
    flex: 1;
    padding: 0px;
    box-sizing: border-box;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
}

/* Buttons container */
.editor-column .buttons {
    margin-bottom: 0px;
    display: flex;
    justify-content:flex-end;
    gap: 5px;
    padding-right: 15px!important;
}

/* Button styling */
.editor-column .buttons button {
    border: none!important;
    color: #008DA6;
    padding:2px 10px!important;
    min-height: 27px;
    font-size: 12px;
}

.editor-column .buttons button svg {
    width: 15px;
    height: 15px;
    display: inline-block;
    vertical-align: middle;
}
.editor-column .buttons button:hover {
    color: #E65100;
}

/* Resolution Display */
.preview-column .resolution {
    background: #f0f0f0;
    padding: 5px;
    font-size: 12px;
    color: #333;
}

.editor-column textarea {
    flex: 1;
    resize: none;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 10px;
    font-family: monospace;
    font-size: 14px;
    background: #fff;
}

.preview-column {
    flex: 1;
    background: #fff;
    box-sizing: border-box;
    padding: 0px;
    display: flex;
    flex-direction: column;
}

.try-it-preview-slot {
    width: 100%;
    height: 100%;
    background: #fff;
    border: none;
}

.try-it-preview-slot.is-hidden {
    display: none!important;
}

#adsense-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
}

.CodeMirror {
    width: 100%;
    height: 100%!important;
    font-family: "Fira Code", Consolas, monospace;;
    font-size: 16px;
}

#code-preview {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    padding: 10px;
}

#browser-resolution{
    min-height: 3px;
    margin-bottom:0px;
    text-align: right;
    padding-right:15px;
}

#copy-code, #download-code, #run-code{
    background-color: transparent;
    color: #FFFFFF;
    background-image: linear-gradient(90deg, #008DA6 48%, #54A0AD 100%);
}

#copy-code:hover, #download-code:hover, #run-code:hover{
    background-image: linear-gradient(90deg, #E65100 50%, #FF6D00 100%);
}

.editor-column .buttons button#run-code{padding:2px 20px!important;}

/* Responsive: stack columns on small screens */
@media (max-width: 900px) {
    .try-it-editor-container {
        flex-direction: column;
        height: auto;
    }
    .editor-column, .preview-column {
        min-height: 50vh;
    }

    .preview-column #code-preview{
        min-height: 50vh;
    }
}
