/* Toast Message CSS file */

:root {
    --toast-surface: var(--bs-body-bg, #ffffff);
    --toast-text: var(--bs-body-color, #000000);
}

/* Basic Toast Theme */
.toast-basic .toast-header {
    background-color: var(--color-info);
    /* Default to info color */
    padding: 10px;
    display: flex;
    align-items: center;
}

.toast-basic .toast-body {
    padding: 15px;
    font-size: 16px;
    color: var(--toast-text);
    background-color: var(--toast-surface);
    text-align: center;
}

/* Club Logo Toast Theme */
.toast-club-logo .toast-header {
    background-color: var(--color-success);
    /* Default to green for success */
    padding: 10px;
    display: flex;
    align-items: center;
}

.toast-club-logo .toast-logo {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

.toast-club-logo .toast-title {
    flex-grow: 1;
    text-align: left;
    color: white;
    font-size: 18px;
}

.toast-club-logo .toast-body {
    padding: 15px;
    font-size: 16px;
    color: var(--toast-text);
    background-color: var(--toast-surface);
    text-align: center;
}

/* Toast Types: Success, Info, Warning, Danger */
.toast.bg-success .toast-header {
    background-color: var(--color-success) !important;
    /* Green for success */
}

.toast.bg-danger .toast-header {
    background-color: var(--color-danger) !important;
    /* Red for danger */
}

.toast.bg-info .toast-header {
    background-color: var(--color-info) !important;
    /* Blue for info */
}

.toast.bg-warning .toast-header {
    background-color: var(--color-warning) !important;
    /* Yellow for warning */
}

/* Custom styles for the Welcome Toast */
.toast.welcome-toast .toast-header {
    background-color: var(--color-success) !important;
    /* Green background for welcome toast */
    padding: 10px;
    align-items: center;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: white;
    justify-content: center;
    position: relative;
}

.toast.welcome-toast .toast-header img {
    position: absolute;
    left: 10px;
    width: 100px;
    height: 100px;
}

.toast.welcome-toast .toast-body {
    font-size: 18px;
    font-weight: bold;
    padding: 15px;
    align-items: center;
    text-align: center;
    background-color: var(--toast-surface);
    color: var(--toast-text);
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 3em;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.toastContainer {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: auto;
}

/* Keep toast positioning consistent without JS style assignments. */
.w5obm-toast-container-front {
    top: calc(var(--nav-offset-desktop, 70px) + 16px);
    z-index: 9999;
}

@media (max-width: 768px) {
    .toastContainer {
        width: 90%;
    }
}

.toast {
    transition: opacity 0.6s ease-in-out;
    opacity: 1;
    min-width: 500px;
    max-width: 800px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin: auto;
}

/* Narrower toast when action buttons are present. */
.toast.w5obm-toast--actions {
    min-width: 400px;
    max-width: 500px;
}

/* Used by the toast builder; replaces inline style background panes. */
.w5obm-toast-icon-pane {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Used by the custom toast theme; replaces inline gradient style. */
.w5obm-toast-header-gradient {
    background-image: linear-gradient(to right, var(--bs-primary), var(--bs-info));
    color: rgb(var(--bs-white-rgb));
}

/* Used by the mini toast theme; replaces inline min-height. */
.w5obm-toast-mini-body {
    min-height: 30px;
}

/* Clipboard fallback textarea used in toast actions; replaces element.style assignments. */
.w5obm-clipboard-textarea {
    position: fixed;
    left: -9999px;
    top: 0;
}

.toast.hiding {
    opacity: 0;
}

.toast-header {
    padding: 10px;
    /* Increased padding */
    align-items: center;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: white;
    justify-content: space-between;
}

.toast-header img {
    float: left;
    margin-right: 10px;
    width: 60px;
    height: 60px;
    border-radius: 5px;
}

.toast-body {
    padding: 15px;
    /* Increased padding */
    align-items: center;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    background-color: var(--toast-surface);
    color: var(--toast-text);
}

.toast-message-container {
    min-height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.toast-message {
    margin: 0.5em 0;
    width: 100%;
}

.toast-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.toast-actions .btn {
    margin: 5px;
    color: white !important;
    padding: 5px 10px;
    border-radius: 5px;
    min-width: 80px;
    text-align: center;
}

.toast-actions .btn-success {
    background-color: green !important;
}

.toast-actions .btn-danger {
    background-color: red !important;
}

.toast-actions .btn-warning {
    background-color: darkgoldenrod !important;
}

/* Adjust button layout in Delete Confirmation Toast */
.toast-body .toast-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: nowrap;
}

.toast-body .toast-actions .btn {
    width: 100px;
    margin: 5px 0;
}