/* Static/CSS/members_styles.css */

/* General Styles */
.container {
    width: 100%; /* Adjusted for mobile */
    margin: 0 auto;
    padding-bottom: 100px;
}

h2, h3, h4 {
    color: #333;
    margin-bottom: 10px;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.form-row .column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-row label {
    font-weight: bold;
}

form .error {
    color: red;
    font-size: 0.9em;
}

/* Button Styles */
button, .button {
    padding: 10px 20px;
    margin-top: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button:hover, .button:hover {
    background-color: #45a049;
}

.form-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap; /* Added for mobile */
}

/* Selection List Styles */
.coach-selection, .selected-coaches, .athlete-selection, .selected-athletes {
    margin-top: 20px;
}

.connectedSortable {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
}

.connectedSortable li {
    margin: 5px 0;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    cursor: pointer;
}

input[type="text"], select, textarea {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}

/* Two Column Layout for Coaches and Athletes */
.two-columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Added for mobile */
}

.column {
    flex: 1;
    margin-right: 10px;
}

.column:last-child {
    margin-right: 0;
}

/* Options Row */
.options-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Added for mobile */
}

/* Members Table */
.members-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.members-table th, .members-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.members-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    cursor: pointer;
}

.members-table th.sort-asc:after {
    content: " \2191"; /* Up arrow */
}

.members-table th.sort-desc:after {
    content: " \2193"; /* Down arrow */
}

/* Clear Filter and Search Box */
.clear-filter {
    font-size: 0.9em;
    cursor: pointer;
    color: #007BFF;
    text-decoration: underline;
    margin-left: 20px;
}

.clear-filter:hover {
    color: #0056b3;
}

/* Members Header */
.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Added for mobile */
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    margin-left: 20px;
    flex-wrap: wrap; /* Added for mobile */
}

#search-box {
    margin-left: 10px;
}

/* Member Form Styles */
.member-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.member-form .form-row,
.member-form .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* Added for mobile */
}

.member-form .form-row .column,
.member-form .checkbox-row .column {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.member-form .form-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap; /* Added for mobile */
}

/* Specific Styles for Remove Button */
button.remove-coach, button.remove-athlete, button.remove-cit {
    background-color: #ff4c4c !important;
    color: white !important;
    border: none !important;
    padding: 5px !important;
    cursor: pointer !important;
    margin-left: 10px !important;
    font-size: 0.8em !important;
    width: 20px !important;
    height: 20px !important;
    text-align: center !important;
    line-height: 10px !important;
}

button.remove-coach:hover, button.remove-athlete:hover, button.remove-cit:hover {
    background-color: #d33 !important;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

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

#confirmButton {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    margin-right: 10px;
    border: none;
    cursor: pointer;
}

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

#cancelButton {
    background-color: #ff4c4c;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}

#cancelButton:hover {
    background-color: #d33;
}

/* Three Column Layout for Coaches, Athletes, and CITs */
.three-columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Added for mobile */
}

.column {
    flex: 1;
    margin-right: 10px;
}

.column:last-child {
    margin-right: 0;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    .two-columns, .three-columns {
        flex-direction: column;
    }
    
    .form-row, .options-row, .members-header, .search-box {
        flex-direction: column;
        gap: 5px; /* Adjust gap for mobile */
    }

    .form-buttons, .form-row, .checkbox-row {
        flex-direction: column;
    }

    .column {
        margin-right: 0;
    }

    .modal-content {
        width: 90%; /* Adjust for smaller screens */
    }
}
/* Static/CSS/members_styles.css */

/* General Styles */
.container {
    width: 100%;
    /* Adjusted for mobile */
    margin: 0 auto;
    padding-bottom: 100px;
}

h2,
h3,
h4 {
    color: #333;
    margin-bottom: 10px;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-start;
}

.form-row .column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-row label {
    font-weight: bold;
}

form .error {
    color: red;
    font-size: 0.9em;
}

/* Button Styles */
button,
.button {
    padding: 10px 20px;
    margin-top: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.button:hover {
    background-color: #45a049;
}

.form-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    /* Added for mobile */
}

/* Selection List Styles */
.coach-selection,
.selected-coaches,
.athlete-selection,
.selected-athletes {
    margin-top: 20px;
}

.connectedSortable {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
}

.connectedSortable li {
    margin: 5px 0;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    cursor: pointer;
}

input[type="text"],
select,
textarea {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}

/* Two Column Layout for Coaches and Athletes */
.two-columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    /* Added for mobile */
}

.column {
    flex: 1;
    margin-right: 10px;
}

.column:last-child {
    margin-right: 0;
}

/* Options Row */
.options-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    /* Added for mobile */
}

/* Members Table */
.members-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.members-table th,
.members-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.members-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    cursor: pointer;
}

.members-table th.sort-asc:after {
    content: " \2191";
    /* Up arrow */
}

.members-table th.sort-desc:after {
    content: " \2193";
    /* Down arrow */
}

/* Clear Filter and Search Box */
.clear-filter {
    font-size: 0.9em;
    cursor: pointer;
    color: #007BFF;
    text-decoration: underline;
    margin-left: 20px;
}

.clear-filter:hover {
    color: #0056b3;
}

/* Members Header */
.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    /* Added for mobile */
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    margin-left: 20px;
    flex-wrap: wrap;
    /* Added for mobile */
}

#search-box {
    margin-left: 10px;
}

/* Member Form Styles */
.member-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.member-form .form-row,
.member-form .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    /* Added for mobile */
}

.member-form .form-row .column,
.member-form .checkbox-row .column {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.member-form .form-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    /* Added for mobile */
}

/* Specific Styles for Remove Button */
button.remove-coach,
button.remove-athlete,
button.remove-cit {
    background-color: #ff4c4c !important;
    color: white !important;
    border: none !important;
    padding: 5px !important;
    cursor: pointer !important;
    margin-left: 10px !important;
    font-size: 0.8em !important;
    width: 20px !important;
    height: 20px !important;
    text-align: center !important;
    line-height: 10px !important;
}

button.remove-coach:hover,
button.remove-athlete:hover,
button.remove-cit:hover {
    background-color: #d33 !important;
}

/* Modal Styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    /* Could be more or less, depending on screen size */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

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

#confirmButton {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    margin-right: 10px;
    border: none;
    cursor: pointer;
}

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

#cancelButton {
    background-color: #ff4c4c;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}

#cancelButton:hover {
    background-color: #d33;
}

/* Three Column Layout for Coaches, Athletes, and CITs */
.three-columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    /* Added for mobile */
}

.column {
    flex: 1;
    margin-right: 10px;
}

.column:last-child {
    margin-right: 0;
}

/* Media Queries for Mobile */
@media (max-width: 768px) {

    .two-columns,
    .three-columns {
        flex-direction: column;
    }

    .form-row,
    .options-row,
    .members-header,
    .search-box {
        flex-direction: column;
        gap: 5px;
        /* Adjust gap for mobile */
    }

    .form-buttons,
    .form-row,
    .checkbox-row {
        flex-direction: column;
    }

    .column {
        margin-right: 0;
    }

    .modal-content {
        width: 90%;
        /* Adjust for smaller screens */
    }
}