/* Developer: Gowtham */
/* Version: 1.0 */

/* Container for the code editor */
.editor {
    height: 300px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    position: relative;
    background-color: #f8f9fa;
}

/* Line numbers section */
.line-numbers {
    position: absolute;
    padding: 10px;
    top: 0;
    left: 0;
    width: 40px;
    background: #e9ecef;
    border-right: 1px solid #ddd;
    text-align: right;
    padding-right: 5px;
    overflow: hidden;
    color: #6c757d;
    font-size: 14px;
    line-height: 18px;
    font-family: 'Courier New', Courier, monospace;
}

/* Textarea styling for better code readability */
textarea {
    width: calc(100% - 40px);
    height: 100%;
    border: none;
    resize: none;
    margin-left: 40px;
    line-height: 18px;
    font-size: 14px;
    font-family: 'Courier New', Courier, monospace;
    color: #495057;
    background: transparent;
}

/* Preview container */
.preview {
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: auto;
    padding: 10px;
    background-color: #f8f9fa;
    transition: transform 0.3s, background-color 0.3s;
}

/* Animation effect when preview updates */
.preview.animate {
    transform: scale(1.05);
    background-color: #e8f5e9;
}

/* Error popup styling */
.error-popup {
    position: fixed;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

/* Card styling for better appearance */
.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Body styling for dark mode toggle */
body {
    transition: background-color 0.3s, color 0.3s;
}

.dark-mode {
    background-color: #121212;
    color: #ffffff;
}

.dark-mode .header,
.dark-mode .footer {
    color: #fff !important;
    background-color: #000 !important;
}

/* Copy button styling */
.btn-copy {
    background-color: #28a745;
    color: white;
}

.btn-copy:hover {
    background-color: #218838;
}

/* Modal backdrop transparency */
.modal-backdrop {
    opacity: 0.7 !important;
}

/* Footer styling */
.footer {
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    margin-top: 20px;
}

/* Header styling */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

/* Toggle button styling */
.toggle-btn {
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.toggle-btn:hover {
    background-color: #0056b3;
}

.toggle-btn.dark-mode {
    background-color: #444;
    color: #fff;
}

.toggle-btn.dark-mode:hover {
    background-color: #222;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.2rem;
    }

    .editor {
        height: 250px;
    }
}

/* Additional Styling for Enhancements */

/* Button group for actions */
.btn-group {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.btn {
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-danger {
    background-color: #dc3545;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Tooltip styling */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
