﻿/* --- Coolmate Style Dashboard --- */
.dn-coolmate-dashboard {
    background: #fff;
    padding: 0;

    position: relative;
    z-index: 10;
    /* Let theme handle padding or keep it minimal */
    border-radius: 8px;

    color: #333;
    margin-bottom: 30px;
}

.dn-cm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.dn-cm-welcome h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #000;
}

.dn-cm-current-tier {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #2f5acf;
    /* Coolmate Blue-ish for "Má»šI" in screenshot */
    margin-bottom: 15px;
    text-transform: uppercase;
}

.dn-tier-icon {
    font-size: 1.2em;
}

.dn-cm-next-target {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
}

.dn-cm-next-target strong {
    color: #2f5acf;
    /* Highlights */
    font-weight: 700;
}

/* Points Box (Right Side) */
.dn-cm-points {
    text-align: right;
}

.dn-cm-points-label {
    font-size: 14px;
    color: #777;
    margin-bottom: 5px;
    display: block;
}

.dn-cm-points-value {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.dn-cm-points-sub {
    font-size: 13px;
    color: #999;
}

/* Timeline */
.dn-cm-timeline-wrapper {
    margin-top: 30px;
}

.dn-cm-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Align top so labels align */
    padding-top: 20px;
    /* Space for dots */
    margin-bottom: 20px;
}

/* The Line Background */
.dn-cm-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    /* Adjust based on dot size */
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    z-index: 1;
    border-radius: 2px;
}

/* The Filled Line */
.dn-cm-progress-line {
    position: absolute;
    top: 24px;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 2;
    pointer-events: none;
}

.dn-cm-progress-filled {

    background: #2f5acf;
    /* Active color */
    border-radius: 2px;
    transition: width 1s ease;
}

/* Nodes */
.dn-cm-node {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    /* Distribute click area */
    text-align: center;
}

/* Dot */
.dn-cm-node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    /* Inactive */
    margin-bottom: 10px;
    border: 2px solid #fff;
    /* White border to separate from line */
    box-shadow: 0 0 0 2px #e0e0e0;
    /* Fake border to look consistent */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #fff;
}

.dn-cm-node.active .dn-cm-node-dot {
    background: #2f5acf;
    box-shadow: 0 0 0 2px #2f5acf;
    width: 16px;
    height: 16px;
    top: -2px;
    /* Center with line */
}

/* Node Labels */
.dn-cm-node-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
}

.dn-cm-node.active .dn-cm-node-info {
    color: #2f5acf;
}

/* .dn-cm-node.current .dn-cm-node-info {} */


.dn-cm-timeline-note {
    font-size: 13px;
    color: #999;
    font-style: italic;
    margin-top: 30px;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .dn-cm-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dn-cm-points {
        text-align: left;
    }

    .dn-cm-node-info {
        font-size: 10px;
        flex-direction: column;
    }
}

/* Points History Table */
.account-orders-table td,
.account-orders-table th {
    text-align: left;
    padding: 12px;
}

/* Voucher Wallet */
.dn-voucher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* My Account Voucher Card (Standalone) */
.dn-voucher-grid .dn-voucher-card {
    display: flex;
    align-items: center;
    border: none;
    border-radius: 8px;
    padding: 15px 20px 15px 40px;
    background: #f2f2f2;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.dn-voucher-grid .dn-voucher-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
}

.dn-voucher-grid .dn-voucher-card::after {
    content: "";
    position: absolute;
    left: 25px;
    top: 10px;
    bottom: 10px;
    width: 0;
    border-left: 1px dashed #ccc;
    z-index: 2;
}

.dn-voucher-grid .dn-voucher-label {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 2;
    align-items: center;
    width: 100%;
    height: 100%;
}

.dn-voucher-grid .dn-voucher-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dn-voucher-grid .dn-voucher-code {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin-bottom: 5px;
}

.dn-voucher-grid .dn-voucher-remaining {
    font-weight: normal;
    color: #6b7280;
    font-size: 12px;
}

.dn-voucher-grid .dn-voucher-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 5px;
}

.dn-voucher-grid .dn-voucher-expiry {
    font-size: 11px;
    color: #9ca3af;
}

.dn-voucher-grid .dn-voucher-condition-btn {
    font-size: 12px;
    color: #111;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    position: absolute;
    bottom: -5px;
    right: 0px;
    z-index: 10;
    pointer-events: auto;
}

.dn-voucher-grid .dn-voucher-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111;
}

.dn-voucher-grid .dn-voucher-icon svg {
    width: 100%;

}

/* --- Points History Table --- */
.dn-history-wrapper {
    margin-top: 20px;
}

.dn-history-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.dn-history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;

}

.dn-history-table th {
    text-align: left;
    padding: 12px 15px;
    color: #777;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
}

.dn-history-table td {
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
    font-size: 14px;
    vertical-align: middle;
}

.dn-history-table tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.dn-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.dn-status-completed {
    background: #e6f7ee;
    color: #28a745;
}

.dn-status-pending {
    background: #fff3cd;
    color: #856404;
}

.dn-status-cancelled,
.dn-status-failed {
    background: #f8d7da;
    color: #721c24;
}

/* Points Colors */
.dn-points-plus {
    color: #28a745;
    font-weight: 600;
}

.dn-points-minus {
    color: #dc3545;
    font-weight: 600;
}

/* Responsive Table */
@media (max-width: 600px) {
    .dn-history-table thead {
        display: none;
    }

    .dn-history-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
    }

    .dn-history-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #eee;
        padding: 8px 0;
        text-align: right;
    }

    .dn-history-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #777;
        margin-right: 10px;
        text-align: left;
    }

    .dn-history-table td:last-child {
        border-bottom: none;
    }
}

/* --- Tier Icon (from shortcode) --- */
.dn-tier-icon-img {
    display: inline-block;
}

/* --- RF Timeline --- */
.rf-timeline {
    position: relative;
    padding: 10px 0;
    width: 100%;
}

.rf-timeline-nodes {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0;

    position: relative;
    z-index: 10;
    width: 100%;
    z-index: 2;
    /* Nodes above bar */
}

/* The line connects the centers of the first and last dots */
.rf-timeline-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 10px;
    right: 10px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    z-index: 1;
}

.rf-timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #3b5bdb, #5c7cfa);
    border-radius: 2px;
    transition: width 0.6s ease;
}

.rf-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20px;
    /* Fixed width small enough to align center */
    /* We let the icon overflow or absolute position it below */
}

.rf-node-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #ccc;
    z-index: 2;
    box-sizing: border-box;
    /* Dot is the anchor */
}

.rf-node--active .rf-node-dot {
    background: #fff;
    border-color: #3b5bdb;
    box-shadow: 0 0 0 2px rgba(59, 91, 219, 0.2);
}

.rf-node-content {
    position: absolute;
    /* Take out of flow to not affect dot alignment */
    top: 20px;
    left: -20px;
    /* shift slightly so center aligns with dot */
    display: flex;
    flex-direction: column;
    width: 6rem;
    /* Ensure space for icon */
}

.rf-node-money {
    position: absolute;
    bottom: 25px;
    /* Above the dot */
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: #888;
    white-space: nowrap;
    text-align: center;
}

.rf-node--active .rf-node-money {
    color: #000;
}

.rf-node-icon {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Remove label styles as label is removed from PHP */
.rf-node-label {
    display: none;
}

/* Responsive Icons Control */
.rf-icon-mobile {
    display: none;
}

/* Specific Alignment for First Node */
.rf-timeline-nodes .rf-node:first-child .rf-node-money,
.rf-timeline-nodes .rf-node:first-child .rf-node-content {
    left: 0;
    transform: none;
    text-align: left;
    align-items: flex-start;
}

/* Specific Alignment for Diamond (Last Node) */
.rf-timeline-nodes .rf-node:last-child .rf-node-money,
.rf-timeline-nodes .rf-node:last-child .rf-node-content {
    left: auto;
    right: 0;
    transform: none;
    text-align: right;
    align-items: flex-end;
}

/* Mobile Breakpoint (<1000px) */
@media (max-width: 1000px) {
    .rf-icon-pc {
        display: none;
    }

    .rf-icon-mobile {
        display: block;
    }
}

.dn-history-empty {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* --- Points History: Container & Header --- */
.dn-history-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 20px;
}

.dn-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.dn-history-header .dn-history-title {
    margin: 0;
    font-size: 20px;
}

.dn-history-table-borderless {
    border: none;
}

.dn-history-row {
    border-bottom: 1px solid #f1f1f1;
}

.dn-history-cell {
    padding: 15px 0;
    border: none;
}

.dn-history-cell--right {
    text-align: right;
    vertical-align: middle;
    border: none;
}

.dn-history-action {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.dn-history-date {
    font-size: 13px;
    color: #888;
}

.dn-history-points {
    font-weight: 600;
    font-size: 16px;
}

.dn-history-points--plus {
    color: #c9a75d;
}

.dn-history-points--minus {
    color: #333;
}

.dn-history-status {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.dn-history-empty-cell {
    padding: 30px 0;
    text-align: center;
    color: #888;
    border: none;
}

/* --- Admin Clear History Button --- */
#dn-clear-history-btn {
    background: #dc3232;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

#dn-clear-history-btn:hover {
    background: #c62828;
}

/* --- Checkout: Error/Success Messages --- */
.dn-loyalty-error {
    color: #dc3232;
}

/* --- Shortcodes: Points Status --- */
.dn-points-earning {
    color: #c9a75d;
    font-weight: 600;
}

.dn-points-processed {
    color: #888;
}

.dn-points-cancelled {
    color: #d63638;
}

.dn-points-empty {
    color: #ccc;
}

/* --- Custom Edit Account (Coolmate Style) --- */
.dn-edit-account-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.dn-profile-section {
    flex: 1;
    min-width: 300px;
    background: #fff;
    /* padding: 20px; */
    /* Theme usually handles padding */
}

.dn-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.dn-profile-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.dn-profile-row:last-of-type {
    border-bottom: none;
}

.dn-profile-row .dn-label {
    color: #666;
    font-weight: 500;
}

.dn-profile-row .dn-value {
    color: #000;
    font-weight: 600;
    text-align: right;
}

.dn-btn-update {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 30px;
    border: 1px solid #000;
    background: transparent;
    color: #000;
    border-radius: 99px;
    /* Pill shape */
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 13px;
    transition: all 0.3s;
}

.dn-btn-update:hover {
    background: #000;
    color: #fff;
}

/* --- Modals (canonical rules at MODAL Shared section below) --- */

.dn-close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.dn-close-modal:hover,
.dn-close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.dn-modal-title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
}

/* Form Styles */
.dn-form-group {
    margin-bottom: 20px;
}

.dn-form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #666;
    font-weight: 500;
}

.dn-form-group input[type="text"],
.dn-form-group input[type="email"],
.dn-form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 99px;
    font-size: 15px;
    outline: none;
    transition: border 0.3s;
}

.dn-form-group input:focus {
    border-color: #000;
}

/* Date Selects */
.dn-dob-group {
    display: flex;
    gap: 10px;
}

.dn-select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 99px;
    /* High radius for pill shape */
    background: #fff;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Remove default arrow if customized */
    text-align: center;
}

/* Radio Group */
.dn-radio-group {
    display: flex;
    gap: 20px;
}

.dn-radio-group label {
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Range Inputs */
.dn-range-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.dn-range-header span {
    color: #2f5ac6;
    /* Blue like design */
    font-weight: 600;
}

.dn-range {
    width: 100%;
    height: 4px;
    background: #e1e4e8;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.dn-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #2f5ac6;
    /* Blue thumb */
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #2f5ac6;
}

/* Password Group */
.dn-pass-group {
    position: relative;
}

.dn-toggle-pass {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 16px;
    height: 16px;
    background-color: #666;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.9,11.6C23.7,11.2,19.5,3,12,3S0.3,11.2,0.1,11.6c-0.1,0.3-0.1,0.6,0,0.9C0.3,12.8,4.5,21,12,21s11.7-8.2,11.9-8.6 C24,12.2,24,11.8,23.9,11.6zM12,19c-5.4,0-8.9-5.4-9.9-7c0.9-1.6,4.5-7,9.9-7c5.4,0,8.9,5.4,9.9,7C20.9,13.6,17.4,19,12,19zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8zM12,14c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C14,13.1,13.1,14,12,14z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.9,11.6C23.7,11.2,19.5,3,12,3S0.3,11.2,0.1,11.6c-0.1,0.3-0.1,0.6,0,0.9C0.3,12.8,4.5,21,12,21s11.7-8.2,11.9-8.6 C24,12.2,24,11.8,23.9,11.6zM12,19c-5.4,0-8.9-5.4-9.9-7c0.9-1.6,4.5-7,9.9-7c5.4,0,8.9,5.4,9.9,7C20.9,13.6,17.4,19,12,19zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8zM12,14c-1.1,0-2-0.9-2-2c0-1.1,0.9-2,2-2c1.1,0,2,0.9,2,2C14,13.1,13.1,14,12,14z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.dn-pass-group input[type='text']~.dn-toggle-pass {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.9,5.2C13.3,5.1,12.6,5,12,5c-5.4,0-8.9,5.4-9.9,7c0.5,0.9,1.1,1.8,1.8,2.5C4.3,15,4.2,15.6,3.8,16 c-0.2,0.2-0.4,0.2-0.6,0.2c-0.3,0-0.6-0.1-0.8-0.4c-0.9-1-1.6-2.2-2.3-3.4c-0.2-0.3-0.2-0.6,0-0.9C0.3,11.2,4.5,3,12,3c0.8,0,1.6,0.1,2.3,0.3c0.5,0.1,0.9,0.7,0.7,1.2C14.9,5,14.4,5.3,13.9,5.2z M0.3,22.3l22-22c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4L19.4,6c1.8,1.6,3.3,3.4,4.5,5.5c0.2,0.3,0.2,0.6,0,0.9C23.7,12.8,19.5,21,12,21c-2.1,0-4.1-0.6-5.8-1.8l-4.5,4.5C1.5,23.9,1.3,24,1,24s-0.5-0.1-0.7-0.3C-0.1,23.3-0.1,22.7,0.3,22.3zM14,11.4L11.4,14c0.2,0.1,0.4,0.1,0.6,0.1c0.5,0,1-0.2,1.4-0.5c0.4-0.4,0.6-0.9,0.6-1.4C14.1,11.9,14,11.7,14,11.4zM12,19c5.4,0,8.9-5.4,9.9-7c-1-1.8-2.3-3.3-3.9-4.6L15.5,10c0.4,0.7,0.6,1.5,0.6,2.3c0,1.1-0.5,2.1-1.3,2.8c-0.7,0.7-1.7,1.1-2.7,1.1c0,0-0.1,0-0.1,0c-0.7,0-1.4-0.3-2-0.6l-2.3,2.3C9,18.6,10.5,19,12,19z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.9,5.2C13.3,5.1,12.6,5,12,5c-5.4,0-8.9,5.4-9.9,7c0.5,0.9,1.1,1.8,1.8,2.5C4.3,15,4.2,15.6,3.8,16 c-0.2,0.2-0.4,0.2-0.6,0.2c-0.3,0-0.6-0.1-0.8-0.4c-0.9-1-1.6-2.2-2.3-3.4c-0.2-0.3-0.2-0.6,0-0.9C0.3,11.2,4.5,3,12,3c0.8,0,1.6,0.1,2.3,0.3c0.5,0.1,0.9,0.7,0.7,1.2C14.9,5,14.4,5.3,13.9,5.2z M0.3,22.3l22-22c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4L19.4,6c1.8,1.6,3.3,3.4,4.5,5.5c0.2,0.3,0.2,0.6,0,0.9C23.7,12.8,19.5,21,12,21c-2.1,0-4.1-0.6-5.8-1.8l-4.5,4.5C1.5,23.9,1.3,24,1,24s-0.5-0.1-0.7-0.3C-0.1,23.3-0.1,22.7,0.3,22.3zM14,11.4L11.4,14c0.2,0.1,0.4,0.1,0.6,0.1c0.5,0,1-0.2,1.4-0.5c0.4-0.4,0.6-0.9,0.6-1.4C14.1,11.9,14,11.7,14,11.4zM12,19c5.4,0,8.9-5.4,9.9-7c-1-1.8-2.3-3.3-3.9-4.6L15.5,10c0.4,0.7,0.6,1.5,0.6,2.3c0,1.1-0.5,2.1-1.3,2.8c-0.7,0.7-1.7,1.1-2.7,1.1c0,0-0.1,0-0.1,0c-0.7,0-1.4-0.3-2-0.6l-2.3,2.3C9,18.6,10.5,19,12,19z'/%3E%3C/svg%3E");
}

/* Submit Button */
.dn-btn-submit {
    width: 100%;
    padding: 15px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 99px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 10px;
}

.dn-btn-submit:hover {
    background: #333;
}

/* --- Toast Notification --- */
.dn-toast {
    position: fixed;
    top: 160px;
    right: 20px;
    background: #000;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 999999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: none;
    font-size: 14px;
    font-weight: 500;
    animation: dnSlideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
}

.dn-toast-success {
    background: #000;
    border-left: 4px solid #4CAF50;
}

.dn-toast-error {
    background: #000;
    border-left: 4px solid #F44336;
}

@keyframes dnSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Spinner --- */
.dn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: dnSpin 1s ease-in-out infinite;
    margin-right: 5px;
    vertical-align: middle;
}

@keyframes dnSpin {
    to {
        transform: rotate(360deg);
    }
}

.dn-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ========================================
   VOUCHER WALLET (Coolmate Style)
   ======================================== */

.dn-voucher-wallet {
    padding: 0;

    position: relative;
    z-index: 10;
}

.dn-voucher-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #1a1a1a;
}

.dn-voucher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* Empty State */
.dn-voucher-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.dn-voucher-empty p {
    margin: 4px 0;
    font-size: 14px;
}

/* Condition Modal */
.dn-condition-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.dn-condition-row:last-child {
    border-bottom: none;
}

.dn-condition-label {
    color: #888;
    min-width: 120px;
    flex-shrink: 0;
}

.dn-condition-value {
    color: #1a1a1a;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .dn-voucher-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
        grid-auto-rows: 1fr;
        gap: 20px;
        margin-top: 20px;
    }
}

@media (max-width: 600px) {
    .dn-voucher-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
        grid-auto-rows: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    .dn-voucher-title {
        font-size: 20px;
    }
}

/* ========================================
   MODAL (Shared)
   ======================================== */

.dn-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    /* Maximized z-index */
    background: rgba(0, 0, 0, 0.45);
    align-items: center;
    justify-content: center;
}

.dn-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: dnModalIn 0.2s ease;
    padding: 24px;
}

@keyframes dnModalIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dn-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ebebeb;
}

.dn-modal-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.dn-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    color: #999;
    padding: 0;
    position: relative;
    z-index: 10;
}

.dn-modal-close:hover {
    color: #333;
}

.dn-modal-body {
    padding: 16px 20px;
}

/* ========================================
   ADDRESS BOOK - MY ACCOUNT (Coolmate Style)
   ======================================== */

.dn-address-book {
    padding: 0;
}

.dn-ab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.dn-ab-title {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.dn-ab-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.dn-ab-btn-add:hover {
    background: #333;
}

.dn-ab-count {
    font-size: 15px;
    color: #555;
    margin-bottom: 16px;
    font-weight: 600;
}

.dn-ab-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.dn-ab-empty p {
    margin: 4px 0;
    font-size: 14px;
}

/* Address Card */
.dn-ab-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dn-ab-card {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    background: #fff;
    transition: border-color 0.2s;
}

.dn-ab-card:hover {
    border-color: #999;
}

.dn-ab-card--default {
    border-color: #000;
    border-width: 1px;
}

.dn-ab-badge-default {
    display: inline-block;
    padding: 2px 10px;
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.dn-ab-card-body {
    margin-bottom: 10px;
}

.dn-ab-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #000;
    margin-bottom: 4px;
}

.dn-ab-card-phone {
    font-weight: 400;
    color: #555;
    margin-left: 12px;
}

.dn-ab-card-address {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.dn-ab-card-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.dn-ab-card-actions button {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s;
}

.dn-ab-btn-edit {
    color: #000;
    text-decoration: underline;
}

.dn-ab-btn-edit:hover {
    color: #333;
}

.dn-ab-btn-default {
    color: #2f5acf;
}

.dn-ab-btn-default:hover {
    color: #1a3fa0;
}

.dn-ab-btn-delete {
    color: #dc3545;
}

.dn-ab-btn-delete:hover {
    color: #a71d2a;
}

/* Address Book Modal Form */
#dn-modal-address .dn-modal-content {
    max-width: 700px;
    position: relative;
}

/* Select2 dropdown z-index: must be above modal overlay (z-index: 999999) */
.select2-container--open {
    z-index: 1000001 !important;
}

/* ========================================
   ADDRESS BOOK - SELECT2 PREMIUM STYLING
   (matches checkout-address.css design)
   ======================================== */

/* Select2 selection box */
#dn-modal-address .select2-container--default .select2-selection--single {
    height: 42px !important;
    border: 1px solid #d0d0d0 !important;
    border-radius: 6px !important;
    background-color: #fff !important;
    outline: none !important;
    transition: border-color 0.2s !important;
}

#dn-modal-address .select2-container--default .select2-selection--single:hover {
    border-color: #999 !important;
}

#dn-modal-address .select2-container--default.select2-container--open .select2-selection--single {
    border-color: #000 !important;
}

/* Selection text */
#dn-modal-address .select2-container--default .select2-selection__rendered {
    line-height: 40px !important;
    font-size: 14px !important;
    color: #333 !important;
    padding-left: 14px !important;
    padding-right: 30px !important;
}

/* Placeholder */
#dn-modal-address .select2-container--default .select2-selection__placeholder {
    color: #999 !important;
}

/* Arrow positioning */
#dn-modal-address .select2-container--default .select2-selection__arrow {
    height: 40px !important;
    right: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hide default Select2 arrow */
#dn-modal-address .select2-container--default .select2-selection__arrow b {
    display: none !important;
}

/* Custom SVG arrow */
#dn-modal-address .select2-container--default .select2-selection__arrow::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 6px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.2s ease;
}

/* Rotate arrow when open */
#dn-modal-address .select2-container--default.select2-container--open .select2-selection__arrow::after {
    transform: rotate(180deg);
}

/* Loading spinner on arrow */
#dn-modal-address .select2-container--default.select2-loading .select2-selection__arrow::after {
    width: 14px;
    height: 14px;
    background-image: none;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: dn-ab-spin 0.6s linear infinite;
}

@keyframes dn-ab-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dropdown container */
.select2-container--open .select2-dropdown {
    border: 1px solid #d0d0d0 !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1) !important;
    padding: 6px !important;
    background-color: #fff !important;
    overflow: hidden !important;
    margin-top: 3px !important;
}

/* Scrollbar */
.select2-results__options {
    max-height: 250px !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.select2-results__options::-webkit-scrollbar {
    width: 6px !important;
}

.select2-results__options::-webkit-scrollbar-track {
    background: transparent !important;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background-color: #ccc !important;
    border-radius: 10px !important;
}

/* Individual option */
.select2-container--default .select2-results__option {
    padding: 10px 14px !important;
    margin-bottom: 2px !important;
    font-size: 14px !important;
    color: #333 !important;
    border-radius: 3px !important;
    transition: all 0.1s ease !important;
    background-color: transparent !important;
}

/* Hover state */
.select2-container--default .select2-results__option--highlighted {
    background-color: #f7f7f7 !important;
    color: #000 !important;
}

/* Selected state */
.select2-container--default .select2-results__option--selected,
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f0f0f0 !important;
    color: #000 !important;
    font-weight: 600 !important;
}

/* Search input in dropdown */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #d0d0d0 !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    outline: none !important;
    margin-bottom: 6px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #000 !important;
}

.dn-ab-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dn-ab-form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

#dn-form-address .dn-form-group {
    margin-bottom: 16px;
}

#dn-form-address .dn-form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #333;
    font-weight: 600;
}

#dn-form-address .dn-form-group label .required {
    color: #dc3545;
}

#dn-form-address .dn-form-group input[type="text"],
#dn-form-address .dn-form-group input[type="tel"],
#dn-form-address .dn-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    box-sizing: border-box;
}

#dn-form-address .dn-form-group input:focus,
#dn-form-address .dn-form-group select:focus {
    border-color: #000;
}

.dn-ab-form-check {
    margin: 16px 0;
}

.dn-ab-form-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.dn-ab-form-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #000;
}

.dn-ab-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.dn-ab-btn-cancel {
    flex: 1;
    padding: 12px 20px;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.dn-ab-btn-cancel:hover {
    background: #f5f5f5;
}

.dn-ab-btn-save {
    flex: 1;
    padding: 12px 20px;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s;
}

.dn-ab-btn-save:hover {
    background: #333;
    border-color: #333;
}

.dn-ab-btn-save:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Address Book Responsive */
@media (max-width: 600px) {
    .dn-ab-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dn-ab-form-row,
    .dn-ab-form-row-3 {
        grid-template-columns: 1fr;
    }

    .dn-ab-title {
        font-size: 20px;
    }

    .dn-ab-btn-add {
        width: 100%;
        justify-content: center;
    }
}