/* MP履歴モーダル */

.mp-history-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.mp-history-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.mp-history-panel {
    background: var(--color-soft-white);
    border-radius: 16px;
    width: 700px;
    height: 820px;
    max-width: 95%;
    max-height: 95%;
    box-shadow: 4px 0px 8px 0px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-base);
}

.mp-history-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--color-gray-100);
}

.mp-history-topbar-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--color-soft-black);
    line-height: 1.4;
}

.mp-history-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 20px 0;
    overflow: hidden;
}

.mp-history-panel-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 20px;
    min-height: 0;
}

.mp-history-search {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.mp-history-panel-body label {
    font-size: 11px;
    color: var(--color-soft-black);
}

.mp-history-search-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-soft-black);
    margin-bottom: 12px;
    padding: 0 24px;
}

.mp-history-preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 24px;
}

.mp-history-preset-btn,
.mp-history-search-submit {
    border: 1px solid var(--color-gray-200);
    background: var(--color-soft-white);
    font-family: var(--font-base);
    color: var(--color-gray-600);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mp-history-preset-btn {
    min-width: 76px;
    min-height: 30px;
    padding: 0 6px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.mp-history-preset-btn:hover {
    background: var(--color-gray-50);
}

.mp-history-preset-btn.is-active {
    border: 1px solid transparent;
    background: linear-gradient(var(--color-pink-purple-mid-light), var(--color-pink-purple-mid-light)) padding-box, var(--color-grad-pink-purple) border-box;
    box-shadow: none;
    color: var(--color-pink-purple-mid);
}

.mp-history-preset-btn.is-active:hover {
    background: linear-gradient(var(--color-pink-purple-mid-light), var(--color-pink-purple-mid-light)) padding-box, var(--color-grad-pink-purple) border-box;
}

.mp-history-range-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 12px;
}

.mp-history-range-separator {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray-500);
}

.mp-history-date-field {
    display: flex;
    align-items: center;
    flex: 0 0 200px;
    width: 200px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--color-gray-200);
    border-radius: 10px;
    background: var(--color-soft-white);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.mp-history-date-field:hover {
    border-color: var(--color-gray-300);
}

.mp-history-date-field.is-disabled {
    background: #fafafa;
    cursor: pointer;
}

.mp-history-date-field.is-disabled:hover {
    border-color: var(--color-gray-200);
}

.mp-history-date-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    border: 0;
    background: transparent;
    font-family: var(--font-base);
    font-size: 12px;
    color: var(--color-soft-black);
    outline: none;
    cursor: pointer;
    appearance: auto;
}

.mp-history-date-input:disabled {
    cursor: default;
    color: var(--color-gray-600);
    -webkit-text-fill-color: var(--color-gray-600);
    opacity: 1;
    pointer-events: none;
}

.mp-history-search-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.mp-history-search-submit {
    min-width: 76px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: none;
    background: var(--color-grad-pink-purple);
    font-size: 12px;
    font-weight: 700;
    color: var(--color-soft-white);
}

.mp-history-search-submit:hover {
    background: var(--color-grad-pink-purple-hover);
}

.mp-history-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0 0 0;
    margin: 0 24px 10px 24px;
    border-top: 1px solid var(--color-gray-100);
}

.mp-history-filter-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-history-filter-btn {
    min-width: 76px;
}

.mp-history-filter-row .mp-history-sort-dropdown {
    margin-left: auto;
}

.mp-history-report {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
    min-height: 0;
    padding: 0 24px;
    overflow-y: auto;
}

.mp-history-report:empty {
    display: none;
}

.mp-history-state-message {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 20px 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-gray-500);
    text-align: center;
}

.mp-history-sort-dropdown {
    min-width: 10px;
}

.mp-history-report-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--color-gray-100);
}

.mp-history-entry {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-gray-100);
}

.mp-history-entry-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mp-history-entry-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-soft-black);
    word-break: break-word;
}

.mp-history-entry-time {
    font-size: 11px;
    line-height: 1.4;
    color: var(--color-gray-600);
}

.mp-history-entry-amount {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: right;
    white-space: nowrap;
    margin: auto 0;
}

.mp-history-entry-amount.is-deposit {
    color: var(--color-pink-purple-mid);
}

.mp-history-entry-amount.is-withdrawal {
    color: var(--color-soft-black);
}
