/* Page Structure: Flexbox for Body */
html, body {
    height: 100%;
    margin: 0;
    display: flex; /* Enables flexbox layout */
    flex-direction: column;
}

/* General Page Layout */
.container {
    max-width: 900px; /* Constrain container size for readability */
    margin: 0 auto; /* Center the container horizontally */
    padding: 20px; /* Add padding for breathing space */
}

/* Main Content Styling */
.main-container {
    background-color: #ffffff; /* Light background for content */
    padding: 40px; /* Padding inside the main content area */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Dashboard Styling */
.dashboard-container {
    max-width: 1000px; /* Ensure the forms aren't too wide */
    margin: 0 auto; /* Center the form horizontally */
    padding: 20px;
    background: #f8f9fa; /* Soft background color for login forms */
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Form Styling */
.form-container {
    max-width: 500px; /* Ensure the forms aren't too wide */
    margin: 0 auto; /* Center the form horizontally */
    padding: 20px;
    background: #f8f9fa; /* Soft background color for login forms */
    border-radius: 10px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Tournament-Specific Styles */
.tournament-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.tournament-box {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    background-color: #f9f9f9;
    text-align: center;
}
.tournament-box h5 {
    margin-bottom: 10px;
    font-weight: bold;
}
.status-open {
    background-color: #28a745;
    color: #fff;
}
.status-closed {
    background-color: #dc3545;
    color: #fff;
}
.status-completed {
    background-color: #007bff;
    color: #fff;
}
.status-unavailable {
    background-color: #6c757d;
    color: #fff;
}

/* Rule Book Modal Styling */
#ruleBookContent {
    line-height: 1.6; /* Improve readability */
    font-size: 1rem;
}
#ruleBookContent ul,
#ruleBookContent ol {
    margin-left: 1.5em; /* Left margin for lists */
}
#ruleBookContent h1, #ruleBookContent h2, #ruleBookContent h3 {
    margin-top: 1em; /* Add spacing above headings */
    font-weight: bold; /* Make headings pop */
}
#ruleBookContent p {
    margin-bottom: 1em; /* Space between paragraphs */
}
.rulebook-icon {
    font-size: 15px;
    color: #FFA500;
    cursor: pointer;
    transition: color 0.3s ease; /* Smooth color transition */
}
.rulebook-icon:hover {
    color: #473a22;
    transform: scale(1.1); /* Slight enlargement effect */
}

.modal-dialog {
    position: fixed;
    top: 10%;
    left: 25%;
    transform: translate(-50%, -50%);
    height: 600px;
    max-width: 500px;
    width: 100%;
}
.modal-body {
    height: 600px;
    width: 500px;
    overflow-y: auto; /* Makes the popup scrollable */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}
.confirm-modal-body {
    height: 100px;
    width: 500px;
    overflow-y: auto; /* Makes the popup scrollable */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Additional Spacing Classes */
.mt-1 {
    margin-top: 0.25rem !important; /* 4px */
    margin-bottom: 0.25rem !important; /* 24px */
}
.mt-2 {
    margin-top: 0.5rem !important; /* 8px */
    margin-bottom: 0.5rem !important; /* 24px */
}
.mt-3 {
    margin-top: 1rem !important; /* 16px */
    margin-bottom: 1rem !important; /* 24px */
}
.mt-4 {
    margin-top: 1.5rem !important; /* 24px */
    margin-bottom: 1.5rem !important; /* 24px */
}
.mt-5 {
    margin-top: 3rem !important; /* 48px */
    margin-bottom: 3rem !important; /* 24px */
}

/* Button Styling */
.btn-edit {
    color: #000;
    background-color: #87e06d;
    border-color: #87e06d;
}
.btn-edit:focus, .btn-edit:hover {
    color: #fff;
    background-color: #5aa745; /* Darker shade for hover/focus */
    border-color: #5aa745;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dropdown-menu {
        width: 100%; /* Ensures dropdown takes full width on mobile */
        text-align: left; /* Improve readability */
    }
    .modal-dialog {
        max-width: 90%; /* Prevent overflow issues on narrow screens */
    }
    .modal-body {
        height: auto;
        padding: 10px; /* Better spacing for readability */
    }
}

.dropdown-toggle {
    border: none;
    background: none;
    font-size: 1.2rem;
    color: #6c757d; /* Match Bootstrap secondary color */
    cursor: pointer;
}

.dropdown-toggle:hover {
    color: #343a40; /* Slightly darker for hover effect */
}

.dropdown-menu {
    text-align: left;
    padding: 0.5rem 1rem;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); /* Slight shadow for depth */
}

i.bi-three-dots-vertical {
    font-size: 18px; /* Icon size */
    cursor: pointer;
}

.dropdown-item {
    font-size: 0.95rem; /* Slightly smaller for readability */
    padding: 0.5rem 1rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa; /* Light hover effect */
    color: #343a40;
}

@media (max-width: 768px) {
    .dropdown-menu {
        width: 100%; /* Ensure dropdown fills screen width on mobile */
    }
}
