/* ==========================================================================
   Novel Points Allocator – Modern Styles
   ========================================================================== */

/* ---------- Global Reset & Variables ---------- */
:root {
    --tpa-green-dark: #2e7d32;
    --tpa-green-mid: #4caf50;
    --tpa-green-light: #a5d6a7;
    --tpa-bg-card: #f1f8e9;
    --tpa-text: #1e1e1e;
    --tpa-white: #ffffff;
    --tpa-shadow: 0 4px 12px rgba(0,0,0,0.08);
    --tpa-radius: 16px;
    --tpa-transition: 0.25s ease;
}

/* ---------- Allocation Form ---------- */
.tpa-form {
    max-width: 400px;
    margin: 1.5em 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tpa-form p {
    margin: 0.8em 0;
}
.tpa-topic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 0.8em;
    margin-bottom: 0.4em;
    background: #65a603;
    border: 1px solid #324d0a;
    border-radius: 6px;
}
.tpa-topic-row label {
    font-weight: 600;
    color: #333;
    min-width: 200px;
}
.tpa-input {
    width: 70px;
    padding: 0.4em 0.5em;
    font-size: 1rem;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.2s;
}
.tpa-input:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 1px #007cba;
}
#tpa-remaining {
    font-weight: 700;
    color: #007cba;
}
#tpa-save-btn {
    margin-top: 0.8em;
    background: #65a603;
    color: #fff;
    border: none;
    padding: 0.6em 1.4em;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}
#tpa-save-btn:hover {
    background: #005a87;
}
#tpa-message {
    display: inline-block;
    margin-left: 1em;
    font-style: italic;
    color: #555;
}

/* ---------- Weekly Schedule ---------- */
.tpa-weekly-schedule {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 1.5em 0;
    justify-content: center;
}

.tpa-day {
    flex: 1 1 140px;
    min-width: 130px;
    max-width: 300px;
    background: #65a603;
    border: none;
    border-radius: var(--tpa-radius);
    padding: 16px 12px;
    box-shadow: var(--tpa-shadow);
    transition: transform var(--tpa-transition), box-shadow var(--tpa-transition);
}
.tpa-day:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.tpa-day h4 {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    color: #1b5e20;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255,255,255,0.6);
    padding-bottom: 6px;
}

.tpa-day ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Individual novel item – pill style */
.tpa-schedule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FBF7E4;
    border: none;
    border-radius: 40px;
    padding: 8px 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    transition: all var(--tpa-transition);
}
.tpa-schedule-item:hover {
    background: #f1f8e9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: scale(1.02);
}

/* Empty state */
.tpa-empty {
    color: #9e9e9e;
    font-style: italic;
    padding: 8px;
    text-align: center;
}

/* Icon wrapper – keep emoji nicely aligned */
.tpa-day li span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 1.5em;
    height: 1.5em;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tpa-reached {
    color: #2e7d32;   /* ✔ */
}
.tpa-not-reached {
    color: #c62828;   /* ❌ */
}

/* Novel name */
.tpa-day li strong {
    font-size: 0.95rem;
    color: var(--tpa-text);
    font-weight: 600;
    /* allow full name to wrap if needed */
    white-space: normal;
    word-break: break-word;
    flex: 1 1 auto;          /* take available space */
    min-width: 0;            /* needed for proper flex shrinking */
}
/* ---------- Admin & Utility ---------- */
.tpa-warning {
    color: #d32f2f;
    background: #ffebee;
    border-left: 4px solid #d32f2f;
    padding: 0.8em 1em;
    border-radius: 8px;
    margin: 1em 0;
}

.tpa-slots-info {
    margin: 1em 0;
    font-size: 1rem;
    background: #e8f5e9;
    padding: 0.6em 1em;
    border-radius: 8px;
    display: inline-block;
    color: #1b5e20;
}

/* ---------- Totals List ---------- */
.tpa-totals {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}
.tpa-totals li {
    padding: 0.5em 0.8em;
    margin-bottom: 0.4em;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.95rem;
    border: 1px solid #e0e0e0;
}
.tpa-totals li strong {
    color: var(--tpa-green-dark);
}


/* Explain the next unlock threshold beside the predicted weekly slot. */
.tpa-unlock-amount {
    display: inline-block;
    margin-left: 5px;
    color: #2c8c11;
    font-size: 0.92em;
    font-weight: 600;
}
