/* database.css */

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 50px;
    flex-direction: column; 
}

.page-title {
    margin: 0 auto;
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    text-decoration: underline;
    color: #333;
}

.last-modified {
    font-size: 1em;
    text-align: center;
}

.last-modified.below-title {
    margin-top: 20px;
}

.player-profile {
    display: flex; /* Use flexbox for better alignment */
    flex-direction: column;
    align-items: center; /* Center children horizontally */
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin: 20px auto; /* Center the box in the middle of the page */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: calc(100% - 40px); /* Adjust width as needed */
}

.player-avatar img {
    width: auto; /* Keep the aspect ratio */
    height: 200px; /* Set a fixed height */
    border-radius: 10px; /* Rounded corners to match the profile box */
    margin-bottom: 20px; /* Space below the avatar */
}

.player-name {
    font-size: 28px; /* Larger font size for better visibility */
    font-weight: bold;
    text-align: center; /* Center the text */
    margin: 0; /* Remove margins if not needed */
}

.player-additional-details {
    display: flex;
    justify-content: center; /* Center these details */
    width: 100%; /* Full width */
    margin-bottom: 20px; /* Space below the additional details */
}

.player-bio, .player-profile-box {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center items */
    text-align: center; /* Center text */
    width: 100%; /* Full width */
}

/* Adjustments for mobile views */
@media (max-width: 768px) {
    .player-profile {
        margin: 10px; /* Smaller margins for mobile */
        padding: 10px; /* Smaller padding for mobile */
        align-items: center; /* Ensure center alignment on mobile */
    }
}

.player-status {
    display: flex; /* Enables flexbox */
    flex-direction: row; /* Aligns items horizontally */
    align-items: center;
    justify-content: center; /* Center horizontally */
    font-size: 18px; /* Maintains the font size */
    margin-bottom: 20px; /* Space below the status */
    width: 100%; /* Ensures full width */
}

.status-label {
    margin-right: 10px; /* Space between label and button */
}

.status-button {
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: bold;
    text-align: center;
    color: white;
    background-color: #ff6347;
    cursor: pointer;
    text-decoration: none;
    margin: 0;
}

.online {
    background-color: #50C878; /* Green background */
}

.offline {
    background-color: #D22B2B; /* Red background */
}

.search {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 40px; /* Added extra bottom margin */
    align-items: center;
}

.col-md-8 {
 margin: 30px 30px 30px 30px; /* Adjusted margins for better spacing */
}
/* CRITICAL: Make this relative so absolute suggestions align properly */
.search-form {
    border: 2px solid #ff80c0;
    border-radius: 0; /* remove rounded edges */
    display: flex;
    align-items: stretch; /* make children fill full height */
    width: 75%;
    position: relative;       /* <-- crucial for autocomplete */
    margin: 0 auto;
    overflow: visible; /* FIXED: Allow dropdown suggestions to show */
    height: 42px; /* matches child height + border */
    margin-bottom: 2em; /* space below search bar */
}

.search .form-control {
    flex-grow: 1;
    padding: 0 15px;
    font-size: 18px;
    border: none;
    border-radius: 0;
    outline: none;
    height: 100%; /* fill parent height */
    box-sizing: border-box;
}

.search .btn-primary {
    padding: 0 20px;
    font-size: 17px;
    color: white;
    background-color: #ff80c0;
    border: none;
    border-radius: 0;
    height: 100%; /* match height of input */
    cursor: pointer;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #ff80c0;
}

.server-status-container {
    margin-bottom: 50px;
}

.server-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-container {
    display: flex;
    justify-content: center;
}

#playerSearchForm {
    text-align: center;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .search-form {
        width: 90%; /* More width on mobile */
    }
    .search .form-control,
    .search .btn-primary {
        padding: 8px 12px;
        font-size: 16px;
        height: 97%; /* Adjust height */
    }
}

/* Large screen tweaks */
@media (min-width: 1200px) {
    .search-container {
        justify-content: center;
        display: flex;
        flex-direction: row;
    }
    #playerSearchForm {
        display: flex;
        flex-grow: 1;
        justify-content: center;
        padding-right: 0;
    }
    .search .form-control {
        flex-grow: 1;
        margin-right: -1px; /* Snug button alignment */
    }
    .search .btn-primary {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }
}

/* Ensure input and button have consistent height */
.search .form-control,
.search .btn-primary {
    height: 40px;
}

/* Center and wrap server status rows */
.server-status-container .row {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
}

.status-button.banned {
    background-color: red;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    margin-left: 10px;
}

/* Container wrapping input + button + suggestions for proper relative positioning */
.autocomplete-container {
    position: relative; /* crucial for absolute suggestions */
    width: 100%; /* full width of parent col */
    display: flex;
}

/* Override form to use flexbox, align items center */
.search-form.search {
    display: block; /* container is block, autocomplete-container handles flex */
    width: 100%;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.autocomplete-suggestion {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.autocomplete-suggestion:last-child {
    border-bottom: 2px solid #0000;
}

.autocomplete-suggestion:hover, 
.autocomplete-suggestion.selected {
    background-color: #ff80c0;  /* your pink highlight color */
    color: white;
}

.autocomplete-suggestion img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    margin-right: 10px;
    object-fit: cover;
    box-shadow: 0 0 5px rgba(0,0,0,0.15);
}
