/* =========================
   MY EXAMPLES
========================= */

.hpc-examples-wrapper{
    display:flex;
    flex-direction:column;
    gap:18px;
}

/* =========================
   HEADER
========================= */

.hpc-examples-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:20px;
    padding:18px 20px;
    border:1px solid rgba(176,138,82,0.28);
    border-radius:10px;
    background:#FFFDF9;
}

.hpc-examples-header h3{
    margin:0 0 5px;
    font-size:22px;
}

.hpc-examples-header p{
    margin:0;
    color:#5E5A55;
}

.hpc-examples-header-right{
    display:grid;
    grid-template-columns:auto auto auto;
    gap:10px;
    align-items:stretch;
}

.hpc-examples-limit{
    min-height:72px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0 14px;
    border:1px solid rgba(176,138,82,0.28);
    border-radius:4px;
    background:#FFFDF9;
    color:#B08A52;
    font-weight:700;
    white-space:nowrap;
}

.hpc-examples-header-buttons{
    display:grid;
    grid-template-rows:1fr 1fr;
    gap:8px;
    align-items:stretch;
}

.hpc-examples-add,
.hpc-examples-presets-button,
.hpc-examples-save-all-outside{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:32px;
    margin:0;
    padding:7px 14px;
    border:1px solid rgba(176,138,82,0.45);
    border-radius:4px;
    background:#FFFDF9;
    color:#171411;
    cursor:pointer;
    font-size:12px;
    line-height:1.2;
    text-decoration:none;
}

.hpc-examples-add-tall{
    min-height:72px;
    padding:10px 16px;
}

.hpc-examples-add:hover,
.hpc-examples-presets-button:hover,
.hpc-examples-save-all-outside:hover{
    background:#B08A52;
    border-color:#B08A52;
    color:#FDFBF8;
}

/* =========================
   REGISTER TABLE
========================= */

.hpc-examples-register{
    overflow-x:auto;
    border:1px solid rgba(176,138,82,0.28);
    border-radius:10px;
    background:#FFFDF9;
}

.hpc-examples-register-head,
.hpc-example-register-row{
    display:grid;
    grid-template-columns:36px 110px 120px 70px 100px 72px 72px 72px 80px 80px 118px 127px;
    gap:7px;
    align-items:center;
    min-width:1150px;
}

.hpc-examples-register-head{
    padding:12px;
    background:#F7F1E8;
    border-bottom:1px solid rgba(176,138,82,0.28);
    font-size:12px;
    font-weight:700;
    color:#5E5A55;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.hpc-example-register-item{
    margin:0;
    padding:0;
    border-bottom:1px solid rgba(176,138,82,0.18);
}

.hpc-example-register-item:last-child{
    border-bottom:none;
}

.hpc-example-register-row{
    padding:10px 12px 6px;
}

.hpc-examples-col-num{
    font-weight:700;
    color:#B08A52;
    text-align:center;
}

.hpc-example-register-row input,
.hpc-example-register-row select{
    width:100%;
    height:36px;
    padding:7px 8px;
    border:1px solid rgba(176,138,82,0.28);
    border-radius:4px;
    background:#fff;
    font-size:14px;
    color:#171411;
    font-weight:600;
}

.hpc-example-register-row input::placeholder{
    color:#B7B0A8;
    font-weight:400;
}

.hpc-example-register-row input:focus,
.hpc-example-register-row select:focus{
    outline:none;
    border-color:#B08A52;
}

/* =========================
   CONDITION COLOURS
========================= */

.hpc-example-condition.condition-new{
    border-color:rgba(20,83,45,.48);
    background:#ECFDF3;
}

.hpc-example-condition.condition-mint{
    border-color:rgba(22,163,74,.45);
    background:#F0FDF4;
}

.hpc-example-condition.condition-near-mint{
    border-color:rgba(134,239,172,.70);
    background:#F7FEE7;
}

.hpc-example-condition.condition-very-good{
    border-color:rgba(30,58,138,.48);
    background:#EFF6FF;
}

.hpc-example-condition.condition-good{
    border-color:rgba(37,99,235,.45);
    background:#F3F7FF;
}

.hpc-example-condition.condition-used{
    border-color:rgba(234,179,8,.55);
    background:#FEFCE8;
}

.hpc-example-condition.condition-worn{
    border-color:rgba(249,115,22,.48);
    background:#FFF7ED;
}

.hpc-example-condition.condition-poor{
    border-color:rgba(220,38,38,.45);
    background:#FEF2F2;
}

.hpc-example-condition.condition-needs-repair{
    border-color:rgba(127,29,29,.70);
    background:#FEF2F2;
}

/* =========================
   NOTE ROW
========================= */

.hpc-example-register-note-row{
    min-width:1150px;
    padding:0 16px 10px 55px;
    display:grid;
    grid-template-columns:1fr 120px;
    gap:7px;
    align-items:start;
}

.hpc-example-register-note-row textarea{
    width:100%;
    min-height:36px;
    height:36px;
    padding:7px 10px;
    border:1px solid rgba(176,138,82,0.28);
    border-radius:4px;
    background:#fff;
    font-size:14px;
    font-weight:600;
    resize:vertical;
}

.hpc-example-register-note-row textarea:focus{
    outline:none;
    border-color:#B08A52;
}

/* =========================
   ACTIONS
========================= */

.hpc-example-register-actions{
    display:flex;
    align-items:center;
    gap:4px;
    white-space:nowrap;
}

.hpc-example-register-actions a,
.hpc-example-register-actions button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:30px;
    min-width:28px;
    padding:0 6px;
    border:1px solid rgba(176,138,82,0.28);
    border-radius:4px;
    background:#fff;
    color:#171411;
    text-decoration:none;
    font-size:12px;
    cursor:pointer;
}

.hpc-example-register-actions a:hover,
.hpc-example-register-actions button:hover{
    border-color:#B08A52;
    background:#B08A52;
    color:#FDFBF8;
}

.hpc-example-save-icon{
    color:#2F7D32 !important;
    font-weight:700;
}

.hpc-example-delete-icon{
    color:#B3261E !important;
    font-weight:700;
}

.hpc-example-save-icon:hover{
    background:#2F7D32 !important;
    border-color:#2F7D32 !important;
    color:#fff !important;
}

.hpc-example-delete-icon:hover{
    background:#B3261E !important;
    border-color:#B3261E !important;
    color:#fff !important;
}

/* =========================
   MONEY / PROFIT COLUMNS
========================= */

.hpc-example-money-field,
.hpc-example-gain,
.hpc-example-approx{
    text-align:right;
}

.hpc-example-gain,
.hpc-example-approx{
    min-height:36px;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    padding:7px 8px;
    border:1px solid rgba(176,138,82,0.18);
    border-radius:4px;
    background:#FDFBF8;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
}

.hpc-example-gain.positive,
.hpc-example-approx.positive{
    color:#2F7D32;
    border-color:rgba(47,125,50,.35);
    background:#F5FBF5;
}

.hpc-example-gain.negative,
.hpc-example-approx.negative{
    color:#B3261E;
    border-color:rgba(179,38,30,.35);
    background:#FFF5F3;
}

/* =========================
   TOTALS
========================= */

.hpc-examples-total{
    margin-top:14px;
    border:1px solid rgba(176,138,82,0.28);
    border-radius:10px;
    background:#FFFDF9;
}

.hpc-examples-total summary{
    padding:14px 18px;
    cursor:pointer;
    font-weight:700;
    color:#171411;
}

.hpc-examples-total-grid{
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:10px;
    padding:0 18px 18px;
}

.hpc-examples-total-grid div{
    padding:12px;
    border:1px solid rgba(176,138,82,0.18);
    border-radius:6px;
    background:#fff;
}

.hpc-examples-total-grid span{
    display:block;
    margin-bottom:4px;
    font-size:12px;
    color:#5E5A55;
}

.hpc-examples-total-grid strong{
    font-size:15px;
}

.hpc-examples-total-grid .positive strong{
    color:#2F7D32;
}

.hpc-examples-total-grid .negative strong{
    color:#B3261E;
}

/* =========================
   NOTICES
========================= */

.hpc-examples-notice,
.hpc-examples-limit-notice,
.hpc-examples-empty,
.hpc-examples-saved{
    padding:18px 20px;
    border:1px solid rgba(176,138,82,0.28);
    border-radius:10px;
    background:#FFFDF9;
}

.hpc-examples-saved{
    border-color:#4E8F5A;
}

/* =========================
   EXAMPLE PRESET NAMES MODAL
========================= */

.hpc-example-presets-modal[hidden]{
    display:none !important;
}

.hpc-example-presets-modal{
    position:fixed;
    inset:0;
    z-index:99999;
}

.hpc-example-presets-backdrop{
    position:absolute;
    inset:0;
    background:rgba(23,20,17,.42);
}

.hpc-example-presets-panel{
    position:relative;
    z-index:1;
    width:min(860px, calc(100vw - 32px));
    max-height:calc(100vh - 40px);
    margin:20px auto;
    overflow:auto;
    border:1px solid rgba(176,138,82,.32);
    border-radius:14px;
    background:#FFFDF9;
    box-shadow:0 24px 80px rgba(0,0,0,.24);
}

.hpc-example-presets-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:18px 20px;
    border-bottom:1px solid rgba(176,138,82,.18);
    background:#FFFCF7;
}

.hpc-example-presets-head h3{
    margin:0;
    color:#171411;
    font-size:20px;
}

.hpc-example-presets-close{
    width:32px;
    height:32px;
    border:1px solid rgba(176,138,82,.35);
    border-radius:4px;
    background:#fff;
    color:#171411;
    cursor:pointer;
    font-size:22px;
    line-height:1;
}

.hpc-example-presets-body{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:18px;
    padding:20px;
}

.hpc-example-presets-section h4{
    margin:0 0 12px;
    color:#B08A52;
    font-size:13px;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.hpc-example-preset-row{
    display:grid;
    grid-template-columns:130px 1fr;
    gap:10px;
    align-items:center;
    margin-bottom:9px;
}

.hpc-example-preset-row span{
    color:#5E5A55;
    font-size:12px;
    font-weight:700;
}

.hpc-example-preset-row input{
    width:100%;
    height:34px;
    padding:7px 9px;
    border:1px solid rgba(176,138,82,.28);
    border-radius:4px;
    background:#fff;
    color:#171411;
    font-size:13px;
}

.hpc-example-preset-row input:focus{
    outline:none;
    border-color:#B08A52;
}

.hpc-example-presets-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:16px 20px 20px;
    border-top:1px solid rgba(176,138,82,.14);
}

.hpc-example-presets-actions button{
    min-height:34px;
    padding:0 16px;
    border:1px solid rgba(176,138,82,.45);
    border-radius:4px;
    background:#fff;
    color:#171411;
    cursor:pointer;
    font-size:12px;
    font-weight:700;
}

.hpc-example-presets-actions button[type="submit"]{
    background:#B08A52;
    border-color:#B08A52;
    color:#FDFBF8;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width:900px){

    .hpc-examples-header{
        flex-direction:column;
    }

    .hpc-examples-header-right{
        width:100%;
        grid-template-columns:1fr;
    }

    .hpc-examples-limit,
    .hpc-examples-add-tall{
        min-height:42px;
    }

    .hpc-examples-register{
        border-radius:8px;
    }

    .hpc-examples-total-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media (max-width:760px){

    .hpc-example-presets-body{
        grid-template-columns:1fr;
    }

    .hpc-example-preset-row{
        grid-template-columns:1fr;
    }
}