/**
 * Browser 2.0 JavaScript Renderer Styles
 *
 * Responsive breakpoints:
 *   mobile  : max-width 600px
 *   tablet  : 601px – 900px
 *   desktop : 901px+  (base styles, max-width 1000px centred)
 */

/* Base styles */
body {
    font-family: Verdana, sans-serif;
    font-size: 12px;
    margin: 0;
    padding: 16px;
    background-color: white;
    box-sizing: border-box;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Heading styles */
h1 { font-size: 35px; }
h2 { font-size: 30px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

/* Container styles */
.lingo-container {
    padding: 20px;
    border: 1px solid #000000;
    border-radius: 5px;
    border-width: 5px;
    margin: 10px 0;
}

/* Form element styles */
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

input[type="text"],
input[type="password"] {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

button {
    /* padding: 8px 16px; */
    margin: 4px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #f5f5f5;
    cursor: pointer;
    vertical-align: middle;
}

button:hover {
    background-color: #e5e5e5;
}

/* Link styles */
a {
    color: blue;
    text-decoration: underline;
    cursor: pointer;
}

/* Debug panel styles */
.debug {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 11px;
}

/* Table styles */
table {
    border: 1px solid black;
    border-collapse: collapse;
	min-width: 65%;
}

table th,
table td {
    border: 1px solid black;
    padding: 5px;
    text-align: left;
    vertical-align: middle;
}

table td {
    vertical-align: middle;
}

/* Form table styles */
.form-table {
    border: none;
    border-collapse: collapse;
}

.form-table td {
    border: none;
    padding: 5px 10px;
    vertical-align: top;
}

.form-description {
    font-style: italic;
    color: #666;
}

.form-submit-row {
    padding: 10px;
}

/* List container styles */
.list-values-container {
    max-width: 300px;
}

.list-item-container {
    margin-bottom: 3px;
    display: flex;
    align-items: center;
}

.list-item-text {
    margin-right: 5px;
}

.list-input {
    margin-right: 5px;
}

.list-empty-text {
    font-style: italic;
    color: #999;
}

.list-selecting:hover {
    background-color: #1300c0;
    color: white;
    cursor: pointer;
}

/* Remove button styles */
.remove-button {
    padding: 0 5px;
    font-size: 16px;
    cursor: pointer;
}

/* Rich text input styles */
.rich-text-input-wrapper {
    display: inline-block;
    min-width: 300px;
    max-width: 400px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.rich-text-toolbar {
    background-color: #f0f0f0;
    border-bottom: 1px solid #ccc;
    padding: 2px 4px;
}

.rich-text-btn {
    padding: 2px 8px;
    font-size: 12px;
    margin: 2px;
}

.rich-text-editor {
    min-height: 80px;
    padding: 6px;
    outline: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* viewer styles */
.viewer-container {
    display: inline-block;
}

.viewer-controls {
    text-align: left;
}

.popup-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
    z-index: 99;
}

.popup-content {
    position: fixed;
    width: 65%;
    top: 30%;
    left: 5%;
    
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    z-index: 100;
}

/* Navigation / breadcrumb styles */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Table scroll wrapper — allows horizontal scrolling on narrow screens */
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile breakpoint */
@media (max-width: 600px) {
    body {
        padding: 8px;
        font-size: 13px;
    }

    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    h4 { font-size: 16px; }

    .form-table td {
        display: block;
        width: 100%;
    }

    button {
        width: 25%;
        padding: 8px 0;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    select,
    textarea {
        max-width: 100%;
        width: 100%;
    }

    .lingo-container {
        padding: 10px;
        border-width: 2px;
    }

    .popup-content {
        width: 90%;
        left: 5%;
        top: 10%;
    }
}

/* Tablet breakpoint */
@media (min-width: 601px) and (max-width: 900px) {
    body { padding: 12px; }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    select,
    textarea {
        max-width: 300px;
    }
}
/* Field validation error styles */
.field-error {
    color: red;
    font-weight: bold;
}
