/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #bdbcbc; /* Darker background color for better contrast */
    color: #000000; /* Lighter text color for readability on a dark background */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Header Styles */
header {
    background-color: #7d7d7d; /* Medium gray background for header */
    padding: 1rem;
    display: flex;
    align-items: center;
    font-weight: bold;
}

#profile-tab {
    background-color: #ffbd39; /* Yellow color for emphasis */
    padding: 10px;
    margin-right: auto; /* Pushes everything else to the right */
    font-weight: bold;
    border-radius: 10px;
}

nav {
    display: flex;
    align-items: center;
    gap: 10px; /* Adds a gap between the nav items */
}

#settings-btn {
    padding: 0.5rem 1rem;
    border: none;
    background-color: #ffbd39; /* Yellow color matches profile tab */
    color: #000000;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

/* Style for Theme Switch (Dark/Light Mode Toggle) */
.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
    margin-right: 20px; /* Ensures some spacing from the settings button */
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #101010; /* Lighter gray for visible contrast */
    transition: .4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 23.4px;
    width: 23.4px;
    left: 4px;
    bottom: 3.6px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #ffbd39; /* Bright yellow for checked state */
}

input:checked + .slider:before {
    transform: translateX(23.4px);
}

/* Main Layout */
main {
    display: flex;
}

#stats {
    flex-basis: 20%;
    padding: 10px;
}

#left-panel {
    flex-basis: 15%;
    padding: 10px;
}

#central-panel {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(2, 48%);
    grid-gap: 15px;
    padding: 10px;
}

.square {
    background-color: #cdcdcd;
    color: #1c1c1c;
    border-radius: 15px;
    padding: 20px;
    height: 375px;
}

.card {
    background-color: #ffcc85;
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer; /* Make cards appear clickable */
}

.card:hover {
    background-color: #f7e0ac; /* Lighter color on hover */
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1050; /* Ensure modals are always on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6); /* More opaque background for a blurred effect */
}

.modal-content {
    position: relative;
    background-color: #949494;
    margin: 10% auto;
    padding: 20px 40px;
    border: 1px solid #888;
    width: 90%;
    height: 600px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    border-radius: 40px;
}

.modal-content textarea {
    min-width: 200px;
    min-height: 50px;
}

/* Delete Button Styles */
#delete-activities-btn {
    background-color: grey;
    color: white;
    border-radius: 50px;
    cursor: not-allowed;
    padding: 8px 12px;
    position: absolute;
    right: 20px;
    bottom: 20px;
}

#delete-activities-btn.enabled {
    background-color: #ffbd39;
    cursor: pointer;
}

.close-button {
    position: absolute;
    right: 20px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

/* Search Bar and Button Styles for Add Users and Add Activities forms to match Search Bar aesthetics */
.search-container, form {
    position:absolute;
    top: 20px;
    right: 50px; /* Adjust this value to position it near the close button */
    display: flex;
    align-items: center;
}

.search-input, input[type="text"], input[type="email"], select, textarea {
    padding: 8px 15px;
    font-size: 16px;
    border: 2px solid #ffbd39; /* Matching the theme's accent color */
    border-radius: 25px;
    outline: none;
    width: 200px; /* Adjust based on preference */
    color: #555;
    background-color: transparent;
    transition: all 0.3s ease;
}

input[type="text"]::placeholder, input[type="email"]::placeholder, textarea::placeholder {
    color: #ccc;
}

.search-button, button[type="submit"] {
    padding: 8px 12px;
    background-color: #ffbd39;
    border: none;
    border-radius: 50%; /* Circular button */
    cursor: pointer;
    font-size: 16px; /* Matching the input field size */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10px;
}

.search-button:hover, button[type="submit"]:hover {
    background-color: #e6ac07; /* Slightly darker shade for hover effect */
}

.search-icon {
    display: inline-block;
    background: url(Assets/icons8-search-208.png) no-repeat center; /* Ensure the icon covers the area */
    width: 24px; /* Icon size */
    height: 24px; /* Icon size */
    background-size: cover;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
    color: #4d4d4d;
}

body.dark-mode header {
    background-color: #1e1e1e;
}

body.dark-mode .card {
    background-color: #4c4b4b;
    color: #ccc;
}

body.dark-mode .square {
    background-color: #646464;
    color: #eee;
}

/* Styles for buttons inside modals */
.modal-content button {
    border-radius: 50px; /* Making buttons more round */
    margin-top: 0px; /* Adjusting spacing between buttons */
}

/* Responsiveness */
@media (max-width: 768px) {
    #left-panel, #central-panel, #stats {
        width: 100%;
        margin-bottom: 1rem;
    }

    #stats {
        position: relative;
    }

    main {
        flex-direction: column;
    }

    #central-panel {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
    }

    #profile-tab, #settings-btn {
        margin-bottom: 1rem;
    }
}
