/* NicoHub Points - Amazon風スタイル */

/* ========================================
   カート・チェックアウト: ポイント利用フォーム
   ======================================== */
.nicohub-points-redeem {
    background: #fff;
    border: 1px solid #d5d9d9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(15, 17, 17, 0.08);
}

.nicohub-points-redeem h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #0f1111;
    line-height: 1.4;
}

.nicohub-points-balance {
    margin: 0 0 16px;
    font-size: 14px;
    color: #565959;
}

.nicohub-points-balance strong {
    color: #c7511f;
    font-size: 15px;
}

/* ラジオボタン選択肢 */
.nicohub-points-options {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nicohub-points-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #d5d9d9;
    border-bottom: none;
    cursor: pointer;
    background: #fff;
    transition: background 0.15s;
}

.nicohub-points-option:first-child {
    border-radius: 8px 8px 0 0;
}

.nicohub-points-option:last-child {
    border-bottom: 1px solid #d5d9d9;
    border-radius: 0 0 8px 8px;
}

.nicohub-points-option:hover {
    background: #f7fafa;
}

.nicohub-points-option.is-selected {
    background: #fef8f2;
    border-color: #c7511f;
    position: relative;
    z-index: 1;
}

.nicohub-points-option.is-selected + .nicohub-points-option {
    border-top-color: #c7511f;
}

.nicohub-points-option input[type="radio"] {
    margin: 2px 0 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #0f1111;
}

.nicohub-points-option .option-text {
    font-size: 14px;
    color: #0f1111;
    line-height: 1.5;
}

.nicohub-points-option .option-text strong {
    color: #0f1111;
}

/* 一部利用: 入力パネル */
.nicohub-points-partial {
    padding: 16px 20px;
    border-left: 1px solid #d5d9d9;
    border-right: 1px solid #d5d9d9;
    background: #fafafa;
}

.nicohub-points-partial-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.nicohub-points-partial-inner input[type="number"] {
    flex: 1;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #888c8c;
    border-radius: 4px;
    font-size: 15px;
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 17, 17, 0.15) inset;
    -moz-appearance: textfield;
}

.nicohub-points-partial-inner input[type="number"]::-webkit-outer-spin-button,
.nicohub-points-partial-inner input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nicohub-points-partial-inner input[type="number"]:focus {
    border-color: #e77600;
    box-shadow: 0 0 0 3px rgba(228, 121, 17, 0.25);
}

.nicohub-points-partial-inner input[type="number"]::placeholder {
    color: #aab7b8;
    font-size: 14px;
}

.partial-unit {
    font-size: 15px;
    color: #565959;
    font-weight: 600;
    flex-shrink: 0;
}

/* 「適用する」ボタン - 全幅 Amazon黄色 */
.nicohub-points-btn-apply {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 400;
    color: #0f1111;
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border: 1px solid #a88734;
    border-radius: 8px;
    cursor: pointer;
    line-height: 38px;
    text-align: center;
    box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}

.nicohub-points-btn-apply:hover {
    background: linear-gradient(to bottom, #f5d78e, #eeb933);
    border-color: #a17c29;
}

.nicohub-points-empty {
    color: #565959;
    font-size: 14px;
    margin: 0;
}

/* ========================================
   獲得予定ポイント（合計欄の下）
   ======================================== */
.nicohub-points-earn-preview th,
.nicohub-points-earn-preview td {
    border-top: 1px dashed #d5d9d9 !important;
    padding-top: 10px !important;
}

.nicohub-points-earn-preview th {
    font-size: 14px;
    font-weight: 400;
    color: #565959;
}

.nicohub-earn-value {
    color: #c7511f;
    font-weight: 700;
    font-size: 15px;
}

/* ========================================
   マイページ: ポイント残高・履歴
   ======================================== */
.nicohub-points-mypage {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* 残高カード - グラデーション背景 */
.nicohub-points-balance-card {
    background: linear-gradient(135deg, #1b19b9 0%, #1b19b9 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(35, 47, 62, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    color: #fff;
}

.nicohub-points-balance-card .balance-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #fff, #fff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 900;
    color: #232f3e;
    flex-shrink: 0;
}

.nicohub-points-balance-card .balance-body {
    flex: 1;
}

.nicohub-points-balance-card .balance-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nicohub-points-balance-card .balance-value {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: 0;
}

.nicohub-points-balance-card .balance-value span {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    margin-left: 4px;
}

.nicohub-points-balance-card .balance-yen {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin: 4px 0 0;
}

/* 獲得情報バー */
.nicohub-points-info-bar {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border: 1px solid #d5d9d9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.nicohub-points-info-bar .info-item {
    flex: 1;
    padding: 14px 16px;
    text-align: center;
    border-right: 1px solid #d5d9d9;
}

.nicohub-points-info-bar .info-item:last-child {
    border-right: none;
}

.nicohub-points-info-bar .info-label {
    display: block;
    font-size: 11px;
    color: #565959;
    margin-bottom: 4px;
}

.nicohub-points-info-bar .info-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1b19b9;
}

/* 履歴セクション */
.nicohub-points-history-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0f1111;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1b19b9;
}

.nicohub-points-no-history {
    text-align: center;
    color: #565959;
    padding: 40px 20px;
    background: #fafafa;
    border-radius: 8px;
    line-height: 1.8;
}

/* テーブルラッパー - スマホ横スクロール */
.nicohub-points-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #d5d9d9;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* 履歴テーブル */
.nicohub-points-history-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
}

.nicohub-points-history-table th {
    background: #f0f2f2;
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #565959;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #d5d9d9;
    white-space: nowrap;
}

.nicohub-points-history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    color: #0f1111;
    font-size: 14px;
    vertical-align: middle;
}

.nicohub-points-history-table tbody tr:last-child td {
    border-bottom: none;
}

.nicohub-points-history-table tbody tr:hover {
    background: #f7fafa;
}

.nicohub-points-history-table .col-date {
    white-space: nowrap;
    font-size: 13px;
    color: #565959;
}

.nicohub-points-history-table .col-type {
    white-space: nowrap;
}

.nicohub-points-history-table .col-desc {
    min-width: 160px;
}

.nicohub-points-history-table .col-points,
.nicohub-points-history-table .col-balance {
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.nicohub-points-history-table .points-plus {
    color: #007600;
    font-weight: 700;
}

.nicohub-points-history-table .points-minus {
    color: #c7511f;
    font-weight: 700;
}

/* 種別バッジ */
.nicohub-points-history-table .type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    text-align: center;
    white-space: nowrap;
}

.type-badge.type-earn {
    background: #e6f4ea;
    color: #1e8e3e;
}

.type-badge.type-bonus {
    background: #fef3cd;
    color: #856404;
}

.type-badge.type-redeem {
    background: #fce8e6;
    color: #c5221f;
}

.type-badge.type-admin {
    background: #e8f0fe;
    color: #1a73e8;
}

/* ページネーション */
.nicohub-points-pagination {
    display: flex;
    gap: 3px;
    margin-top: 16px;
    justify-content: center;
}

.nicohub-points-pagination a,
.nicohub-points-pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d5d9d9;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    color: #0f1111;
    background: #fff;
}

.nicohub-points-pagination span.current {
    background: #232f3e;
    border-color: #232f3e;
    color: #fff;
    font-weight: 700;
}

.nicohub-points-pagination a:hover {
    background: #f7fafa;
    border-color: #a6a6a6;
}

.nicohub-points-pagination a.prev,
.nicohub-points-pagination a.next {
    font-weight: 700;
}

/* ========================================
   ショートコード: インライン残高
   ======================================== */
.nicohub-points-inline {
    font-weight: 700;
    color: #c7511f;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 600px) {
    .nicohub-points-balance-card {
        padding: 20px;
        gap: 16px;
    }

    .nicohub-points-balance-card .balance-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .nicohub-points-balance-card .balance-value {
        font-size: 28px;
    }

    .nicohub-points-info-bar .info-value {
        font-size: 14px;
    }
}
