/* style.css */
/* Modified on 10/5/2024, 4:00 pm Eastern Time */

/* Global Styles */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Prevent body from scrolling */
}

body {
    font-family: Arial, sans-serif;
    text-align: center;
    position: relative;
}

/* No Text Decoration for Links */
.no-decoration {
    text-decoration: none;
}

/* Toolbar Styling */
#toolbar {
    background-color: #f0f0f0;
    padding: 5px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Toolbar Layer */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#toolbar button[type="button"], 
#toolbar input[type="color"], 
#toolbar input[type="range"] {
    margin: 0 5px;
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
}

#toolbar button[type="button"]:hover, 
#toolbar input[type="color"]:hover, 
#toolbar input[type="range"]:hover {
    background-color: #e6e6e6;
}

/* Hidden Class for Toggling Visibility */
.hidden {
    display: none !important;
}

/* Focus Styles for Accessibility */
button:focus, input:focus {
    outline: 2px solid #00aaff;
}

/* Graph Toggle Styling */
.graph-toggle-label {
    margin-left: 15px;
    font-size: 16px;
}

.graph-toggle-checkbox {
    transform: scale(1.5);
    margin-left: 5px;
}

/* Canvas Styling */
#whiteboard {
    position: absolute;
    left: 0;
    cursor: crosshair;
    touch-action: none; /* Prevent touch gestures like scrolling */
    background-color: #fff;
}

#backgroundCanvas {
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    pointer-events: none;
}

/* Modal Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000; /* Modal Layer */
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

/* Form Styling */
#inviteForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

#inviteForm input[type="email"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#inviteForm button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

#inviteForm button:hover {
    background-color: #45a049;
}

#inviteStatus {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

/* Branding Styles */
.brand-title {
    font-size: 20px;
    color: orange;
    display: inline-block;
    margin-right: 15px;
    font-weight: bold;
}

.brand-info {
    color: #00aaff;
}

.brand-tech {
    color: #28a745;
}

/* Show Toolbar Button Styling */
.show-toolbar-button {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    z-index: 1500; /* Show Toolbar Button Layer */
    transition: background-color 0.3s;
}

.show-toolbar-button:hover {
    background-color: #45a049;
}

/* Active Peers List */
#activePeers {
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: rgba(240, 240, 240, 0.9);
    padding: 10px;
    border-top-right-radius: 10px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #toolbar {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    #toolbar button[type="button"], 
    #toolbar input[type="color"], 
    #toolbar input[type="range"] {
        font-size: 14px;
        padding: 6px 10px;
    }

    .modal-content {
        width: 90%;
    }
}
