table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    border: 1px solid #814d85;
    padding: 10px;
    text-align: left;
}

#totalSection {
    margin-top: 20px;
    padding: 15px;
    border: 2px solid #814d85;
    border-radius: 5px;
    opacity: 0;  /* Start hidden */
    max-width: min(800px, calc(100vw - 30px));  /* Use viewport width with padding */
    word-wrap: break-word;
    margin: 20px auto;
    box-sizing: border-box;
    width: 100%;
}
.quantity-input {
    width: 60px;
    padding: 5px;
}
.quantity-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    background: #5c375f;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-family: monospace;
    transition: all 0.1s;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
}

.quantity-btn:active {
    transform: scale(0.95);
    animation: glow 0.1s ease-out;
    box-shadow: 
        0 0 5px #ff69b4,
        0 0 10px #ff69b4,
        0 0 15px #ff1493;
    text-shadow:
        0 0 5px white,
        0 0 10px white,
        0 0 15px white;
}

.quantity-display {
    width: 30px;
    text-align: center;
    font-family: monospace;
}


.pgp {
    font-family: Gohu !important;
}

.warning-box {
    background: #452e38;
    border: 1px solid #814d85;
    padding: 12px;
    margin-left: 20px;
    max-width: 300px;
    font-family: 'Mix', serif;
    color: rgb(227, 227, 227);
    text-align: center;
}

.warning-box strong {
    color: #e74848;
    display: block;
    margin-bottom: 8px;
}

.warning-box p {
    color: #cccbcb;

}

.warning-box a,
.warning-box a:visited {
    color: #ffffff !important;
}

.warning-box a:hover,
.warning-box a:active {
    color: #ffffff !important;
}

#floatingTotal {
    position: sticky;
    bottom: 0;
    background: #13092D !important;
    border-top: 2px solid #814d85;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    z-index: 1;
}

#cryptoAddress {
    word-break: break-word;
    white-space: normal;
    line-height: 1.4;
    font-size: 1.3em;
    max-width: 100%;
    overflow-wrap: break-word;
    font-family: monospace;
    display: block;
    margin-top: 5px;
    padding: 8px;
    background: #181a1b;
    border: 1px solid #814d85;
    max-width: 100%;
    overflow-x: auto;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
}

#totalSection p {
    max-width: 100%;
    overflow-wrap: break-word;
}



.loader-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loader {
    position: relative;
    width: 80px;  /* Reduced from 100px */
    height: 80px; /* Reduced from 100px */
    animation: rotate 2s linear infinite;
}

.loader::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/static/oldinternet/img/furby-round.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-family: 'Mix', serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.order-note {
    margin-top: 20px;
    padding: 10px;
    font-size: 1.0em;
    background: rgba(129, 77, 133, 0.1);
    border-left: 3px solid #ff69b4;
    margin-top: 15px;
    padding: 8px;
}

.order-note p {
    margin: 0;
    color: #cccbcb;
    font-size: 0.9em;
    font-family: 'Mix', serif;
    font-size: 0.8em;
}

.payment-box {
    background: rgba(129, 77, 133, 0.1);
    border: 1px solid #814d85;
    padding: 10px;
    margin-bottom: 15px;
    margin: 10px 0;
    overflow-x: auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
}

.payment-box p {
    margin: 0;
    color: #fff;
    font-family: 'Mix', serif;
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 1.4;
}

#cryptoLabel,
#addressLabel {
    font-size: 1.2em !important;
}
#cryptoPayAmount {
    font-family: 'Gohu' !important;
    font-weight: bold;
    color: #ff69b4;
    font-size: 1.2em !important;
    letter-spacing: 2px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    display: inline-block;
    max-width: 100%;
    font-size: 1em;
    letter-spacing: 1px;
    font-size: 0.9em;
    letter-spacing: 0;
    word-break: break-all;
}

#orderDetails {
    margin-top: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#orderDetails p {
    margin: 5px 0;
    line-height: 1.4;
}

/* Disguise tooltip styles */
.region-buttons {
    overflow: visible !important;
}

#disguisedSelection {
    overflow: visible !important;
}

/* Make crypto tooltips behave the same as region tooltips */
.crypto-buttons {
    overflow: visible !important;
}

.crypto-button.has-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #4a2a5d;
    border: 1px solid #814d85;
    border-radius: 4px;
    width: 280px;
    z-index: 9999;
    color: #d7c2cb;
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.crypto-button.has-tooltip:hover::before,
.crypto-button.has-tooltip.show-tooltip::before {
    opacity: 1;
    visibility: visible;
}

.region-button.has-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background-color: #4a2a5d;
    border: 1px solid #814d85;
    border-radius: 4px;
    width: 280px;
    z-index: 9999;
    color: #d7c2cb;
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.region-button.has-tooltip:hover::before,
.region-button.has-tooltip.show-tooltip::before {
    opacity: 1;
    visibility: visible;
}

/* On touch devices, disable hover and only use show-tooltip class */
@media (hover: none) and (pointer: coarse) {
    .region-button.has-tooltip:hover::before {
        opacity: 0;
        visibility: hidden;
    }
    
    .region-button.has-tooltip.show-tooltip::before {
        opacity: 1;
        visibility: visible;
    }

    .crypto-button.has-tooltip:hover::before {
        opacity: 0;
        visibility: hidden;
    }

    .crypto-button.has-tooltip.show-tooltip::before {
        opacity: 1;
        visibility: visible;
    }
}

/* Accessible mode overrides */
body.accessible #floatingTotal {
    background: rgb(255, 245, 255) !important;
    border-top-color: #f0afde !important;
    color: #000000 !important;
}

body.accessible .pgp-help-toggle {
    background-color: rgb(255, 245, 255) !important;
    border-color: #f0afde !important;
    color: #4e364b !important;
}

/* Keep text black on all button states */
body.accessible .region-button.region-button.selected,
body.accessible .region-button.region-button:hover,
body.accessible .crypto-button.crypto-button.selected,
body.accessible .crypto-button.crypto-button:hover,
body.accessible .order-button.order-button:hover,
body.accessible .quantity-btn.quantity-btn:hover,
body.accessible label.region-button.region-button.region-button:has(input[type="radio"]:checked),
body.accessible label.crypto-button.crypto-button.crypto-button:has(input[type="radio"]:checked),
body.accessible input[type="radio"]:checked + label.region-button.region-button.region-button,
body.accessible input[type="radio"]:checked + label.crypto-button.crypto-button.crypto-button,
body.accessible .region-button.region-button.region-button:has(input[type="radio"]:checked),
body.accessible .crypto-button.crypto-button.crypto-button:has(input[type="radio"]:checked) {
    color: #4e364b !important;
}

body.accessible .region-button input[type="radio"]:checked ~ *,
body.accessible .crypto-button input[type="radio"]:checked ~ * {
    color: #4e364b !important;
}

/* Tooltip accessible mode styling */
body.accessible .region-button.has-tooltip::before {
    background-color: rgb(255, 245, 255) !important;
    border: 1px solid #f0afde !important;
    color: #4e364b !important;
}

body.accessible .crypto-button.has-tooltip::before {
    background-color: rgb(255, 245, 255) !important;
    border: 1px solid #f0afde !important;
    color: #4e364b !important;
}

