/* Color Theme
Burgandy: #800020
Burgandy hover dark: #660018
Burgandy hover bright: #B3002D
Cream: #FFFDD0
Rose: #EFE4E1
Blue: #006080
Black: #000
*/

/* BASE */
    /* Main Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #006080;
    margin: 0px;
    padding: 0px;
}

.container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

header {
    font-size: 1.5em;
    background-color: #800020;
    color: #EFE4E1;
    padding: 10px 0px;
    text-align: center;
}

    /* Flash Messages */
.flashes {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
}

.flashes li {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    color: #fff;
}

.flashes .info {
    background-color: #000;
}

.flashes .success {
    background-color: #4CAF50;  /* Green for success */
}

.flashes .danger {
    background-color: #f44336;  /* Red for errors */
}

.flashes .warning {
    background-color: #ff9800;  /* Orange for warnings */
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-20px); }
}


/* INDEX */
    /* Welcome Container */
.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-left: 10px;
    padding-right: 10px;
    background-color: #FFFDD0;
    border: 2px solid #000;
    border-radius: 0px;
}

.welcome-message {
    font-size: 1.7em;
    margin-left: 5px;
    text-align: left;
    margin-bottom: 0px;
    width: 100%;
}

    /* Account Actions */
.account-actions-container {
    display: flex;
    justify-content: flex-end;
    margin-top: -30px;
    width: 100%;
}

.account-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;  /* between buttons */
}

.account-actions a {
    margin: 5px;
    padding: 10px 10px;
    text-decoration: underline;
    border-radius: 5px;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
}

.account-actions .btn {
    flex: 1;
    text-align: center;
}

.account-actions .btn:hover {
    background-color: #B3002D;
}


/* COMPONENTS */
.component-container {
    overflow-x: auto;
    overflow-y: hidden;
    background-color: #800020;
    padding: 10px;
}

.component {
    background-color: #FFFDD0;
    border: 2px solid #000;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 5px;
}

.component-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #000;
}

button {
    margin-top: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background-color: #006080; /* Primary button color */
    color: #EFE4E1; /* White text for contrast */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.2s; /* Smooth hover transition */
}

button:hover {
    background-color: #005070; /* Darker button color on hover */
}

.remove-btn {
    margin-top: 0px;
    margin-left: 15px;
    padding: 2px;
    color: #660018;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}


/* TABLES */
.user-table-container {
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #FFFDD0;
    border-radius: 10px;
}

.user-table th, .activities-table td {
    padding: 8px;
    text-align: left;
    background-color: #FFFDD0;
    border-radius: 10px;
}

.user-table th {
    font-weight: bold;
    color: #333;
    background-color: #FFFDD0;
}

.user-table tr:nth-child(even) {
    background-color: #FFFDD0;
}

.npc-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    max-height: 1200px;
}

table.npc-detailed-table {
    width: max-content;
    border-collapse: collapse;
    min-width: 1200px;
}

table.npc-detailed-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

table.npc-detailed-table th,
table.npc-detailed-table td {
    border: 1px solid #ccc;
    padding: 8px;
    vertical-align: top;
    text-align: left;
    white-space: pre-wrap;
}

/* Fixed widths for key columns */

.npc-detailed-table th:nth-child(3),
.npc-detailed-table td:nth-child(3) {
    width: 200px; /* High Concept */
}

.npc-detailed-table th:nth-child(4),
.npc-detailed-table td:nth-child(4) {
    width: 300px; /* Overview */
}

.npc-detailed-table th:nth-child(5),
.npc-detailed-table td:nth-child(5) {
    width: 300px; /* Appearance */
}

.npc-detailed-table th:nth-child(6),
.npc-detailed-table td:nth-child(6) {
    width: 300px; /* Personality */
}

.npc-detailed-table th:nth-child(7),
.npc-detailed-table td:nth-child(7) {
    width: 200px; /* Location */
}

.npc-detailed-table th:nth-child(8),
.npc-detailed-table td:nth-child(8) {
    width: 300px; /* Connections */
}

.npc-detailed-table th:nth-child(9),
.npc-detailed-table td:nth-child(9) {
    width: 300px; /* Plot Hooks */
}

/*
table.npc-detailed-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    word-wrap: break-word;
}

table.npc-detailed-table th,
table.npc-detailed-table td {
    border: 1px solid #ccc;
    padding: 8px;
    vertical-align: top;
    text-align: left;
}

table.npc-detailed-table th {
    background-color: #f2f2f2;
}
*/

/* DICE ROLLER COMPONENT*/
#dice-form {
    margin-top: 20px;
    padding: 0px;
    background-color: #FFFDD0;
}

.dice-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.dice-label {
    width: 60px;
}

.result-box {
    margin-left: 10px;
}

.total-box {
    font-weight: bold;
    margin-top: 20px;
    background-color: #FFFDD0;
}


/* INITIATIVE TRACKER COMPONENT */
    /* Panel Config */
#initiative-tracker {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

.initiative-panels {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 0px;
}

.panel-titles {
    display: flex;
    justify-content: space-between; /* Align titles with panels */
    text-align: center;
}

.panel-footer {
    display: flex;
    justify-content: space-between; /* Align titles with panels */
    text-align: center;
}

.panel-titles h3 {
    flex: 1; /* Equal spacing */
    text-align: center;
}

.panel {
    flex: 1; /* Equal size for each panel */
    border: 1px solid #000;
    border-radius: 8px;
    padding: 10px; /* Inner spacing */
    background-color: #EFE4E1;
    overflow-y: auto; /* Scrollable if content overflows */
    overflow-x: auto;
    max-height: 800px;
}

.placeholder {
    color: #aaa; /* Light gray text for placeholder */
    font-style: italic; /* Italicized text for visual differentiation */
    text-align: center; /* Center align placeholder text */
}

    /* Lists Config */
ul {
    list-style-type: none; /* Remove default list styling */
    padding: 0; /* Remove inner padding */
    margin: 0; /* Remove outer margin */
    width: 100%; /* Take full panel width */
}

li {
    padding: 12px;
    margin: 5px 25px;
    border-radius: 4px;
    border: 1px solid #ccc; /* Light border around list items */
    background-color: #fff; /* Default white background */
    cursor: grab; /* Show grab cursor to indicate draggable items */
    text-align: center; /* Keep default center alignment */
}

    /* Initiative Lists */
#initiative-list li {
    display: flex; /* Use flexbox for proper alignment */
    align-items: center; /* Align elements vertically */
    justify-content: space-between; /* Ensure spacing between elements */
    text-align: left; /* Ensure only initiative list items align left */
}

.initiative-input {
    width: 40px; /* Fixed width for initiative number */
    text-align: center; /* Center the numbers inside */
    margin-right: 5px; /* Space before creature name */
}

#initiative-list .initiative-name {
    flex-grow: 1; /* Allow name to expand naturally */
    padding-left: 5px; /* Padding before creature name */
    text-align: left; /* Align text to the left */
}


/* MODAL DISPLAY */
    /* Hide the modal by default */
.modal {
    display: none; /* Initially hidden */
    position: fixed;
    z-index: 1000;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

    /* Background overlay */
.modal-overlay {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

    /* Close button */
.close-modal {
    float: right;
    font-size: 20px;
    cursor: pointer;
}

