/* Main styles for CandyBot web interface */

/* Navigation styles */
ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
}

li a:hover:not(.active) {
    background-color: #111;
}

li a {
    display: block;
    color: white;
    text-align: center;
    padding: 0px 14px;
    text-decoration: none;
}

li {
    float: left;
}

.active {
    background-color: greenyellow;
}

/* About button styles */
#aboutButton {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #4CAF50;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1000;
    font-size: 12px;
}

#aboutButton:hover {
    background-color: #45a049;
}

/* Settings panel styles */
.settings-panel {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.settings-panel summary {
    padding: 10px 15px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}

.settings-panel summary:hover {
    background-color: #e9ecef;
}

.settings-content {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.settings-group {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 12px;
    background-color: #fafafa;
}

.settings-group h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.settings-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.settings-row button {
    flex: 1;
    padding: 8px 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    min-width: 100px;
}

.settings-row button:hover {
    opacity: 0.9;
}

.settings-row button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.settings-row textarea {
    width: 100%;
    height: 40px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
}

.settings-row label {
    width: 100px;
    flex-shrink: 0;
    font-weight: 500;
}

.settings-row input,
.settings-row select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Control panel styles */
.control-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.code-buttons button {
    background-color: #2196F3;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 8px;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Status indicator styles */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    background-color: #dc3545;
}

.connected {
    background-color: #28a745;
}

.status-display {
    display: flex;
    align-items: center;
}

.ml-2 {
    margin-left: 8px;
}

/* Device selector styles */
#deviceSelector {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
    display: none;
}

/* Button styles for menu */
#hiddenmenu button {
    margin: 2px;
    cursor: pointer;
}

/* Text area styles */
textarea {
    resize: vertical;
    font-family: monospace;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
}

/* General button styles */
button {
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    opacity: 0.9;
}

/* Combo box styles */
select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Main layout */
#main {
    padding: 10px;
}

#header {
    margin-bottom: 15px;
}

/* Blockly workspace */
#blocklyDiv {
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Collapsible panel styles */
.card-header[data-bs-toggle="collapse"] {
    cursor: pointer;
    user-select: none;
}

.card-header[data-bs-toggle="collapse"]:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.collapse {
    transition: all 0.3s ease;
}

.bi-chevron-down {
    transition: transform 0.3s ease;
}