/* Crypto Payment Modal System */
/* Version 1.0 - Compatible with all product pages */

/* Modal Overlay */
.crypto-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.crypto-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.crypto-modal {
    background: radial-gradient(1200px 600px at 10% -10%, rgba(243, 243, 243, 0.094), transparent 40%), 
                radial-gradient(800px 400px at 110% 10%, rgba(243, 243, 243, 0.063), transparent 45%), 
                rgb(11, 11, 11);
    border: 1px solid rgb(38, 38, 38);
    border-radius: 18px;
    width: min(96vw, 640px);
    min-width: min(96vw, 380px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.6) 0px 25px 80px -20px;
    will-change: transform, opacity;
    opacity: 0;
    transform: scale(0.95);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.crypto-modal-overlay.active .crypto-modal {
    opacity: 1;
    transform: scale(1);
}

/* Modal Header */
.crypto-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgb(38, 38, 38);
}

.crypto-modal-header-title {
    font-size: 16px;
    font-weight: 600;
    color: rgb(243, 243, 243);
}

.crypto-modal-close {
    background: transparent;
    border: none;
    color: rgb(161, 161, 170);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
}

.crypto-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgb(243, 243, 243);
}

.crypto-modal-close svg {
    width: 18px;
    height: 18px;
}

/* Modal Body */
.crypto-modal-body {
    padding: 24px 32px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.crypto-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: rgb(243, 243, 243);
    letter-spacing: 0.2px;
    margin-bottom: 16px;
}

.crypto-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Crypto Selector */
.crypto-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.crypto-select-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.crypto-select-wrapper {
    position: relative;
}

.crypto-select-label {
    font-size: 13px;
    font-weight: 600;
    color: rgb(161, 161, 170);
    letter-spacing: 0.3px;
}

/* Custom Select */
.custom-select {
    position: relative;
    display: none;
}

.custom-select.active {
    display: block;
}

.custom-select-trigger {
    background-color: rgb(20, 20, 20);
    border: 1px solid rgb(38, 38, 38);
    border-radius: 10px;
    padding: 12px 14px;
    padding-right: 36px;
    color: rgb(243, 243, 243);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: rgba(0, 124, 255, 0.5);
    background-color: rgb(26, 26, 26);
}

.custom-select.disabled .custom-select-trigger {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-select.disabled .custom-select-trigger:hover {
    border-color: rgb(38, 38, 38);
    background-color: rgb(20, 20, 20);
}

.custom-select.open .custom-select-trigger {
    border-color: #007CFF;
    box-shadow: 0 0 0 3px rgba(0, 124, 255, 0.1);
}

.custom-select-arrow {
    width: 12px;
    height: 8px;
    transition: transform 0.2s;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

/* Custom Dropdown */
.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: rgb(20, 20, 20);
    border: 1px solid rgb(38, 38, 38);
    border-radius: 10px;
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    max-height: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.custom-select.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 12px 14px;
    color: rgb(243, 243, 243);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid rgb(30, 30, 30);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: linear-gradient(90deg, rgba(0, 124, 255, 0.15) 0%, rgba(0, 124, 255, 0.05) 100%);
    color: #007CFF;
}

.custom-select-option.selected {
    background: linear-gradient(90deg, rgba(0, 124, 255, 0.2) 0%, rgba(0, 124, 255, 0.08) 100%);
    color: #007CFF;
    font-weight: 600;
}

/* Scrollbar */
.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: rgb(15, 15, 15);
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgb(50, 50, 50);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgb(70, 70, 70);
}

/* Modal Loader */
.crypto-modal-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 13, 13, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.crypto-modal-loader.active {
    opacity: 1;
    pointer-events: all;
}

.crypto-loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgb(38, 38, 38);
    border-top-color: #3AC270;
    border-radius: 50%;
    animation: cryptoSpin 0.8s linear infinite;
}

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

.crypto-loader-text {
    font-size: 14px;
    color: rgb(161, 161, 170);
    font-weight: 500;
}

/* Payment Box */
.crypto-payment-box {
    background-color: rgb(26, 26, 26);
    border: 1px solid rgb(38, 38, 38);
    border-radius: 12px;
    padding: 16px;
}

/* Price Display */
.crypto-price-display {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

.crypto-price-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crypto-price-label {
    font-size: 12px;
    color: rgb(161, 161, 170);
}

.crypto-price-value {
    font-size: 18px;
    font-weight: 700;
    color: rgb(243, 243, 243);
    display: flex;
    align-items: center;
    gap: 8px;
}

.crypto-copy-amount-btn {
    padding: 6px;
    background: transparent;
    border: none;
    color: rgb(161, 161, 170);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.crypto-copy-amount-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgb(243, 243, 243);
}

.crypto-copy-amount-btn svg {
    width: 15px;
    height: 14px;
}

/* Timer and Confirmations Wrapper */
.crypto-timer-confirmations-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

/* Timer */
.crypto-timer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background-color: rgb(26, 26, 26);
    border: 1px solid rgb(38, 38, 38);
    border-radius: 10px;
    flex: 1;
}

.crypto-timer-icon {
    flex-shrink: 0;
}

.crypto-timer-circle {
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
}

.crypto-timer-circle-bg {
    fill: none;
    stroke: rgba(58, 194, 112, 0.5);
    stroke-width: 3;
}

.crypto-timer-circle-progress {
    fill: none;
    stroke: #3AC270;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.crypto-timer-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crypto-timer-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(243, 243, 243, 0.6);
    letter-spacing: 0.5px;
}

.crypto-timer-text {
    font-size: 18px;
    font-weight: 700;
    color: #3AC270;
    font-variant-numeric: tabular-nums;
}

/* Confirmations */
.crypto-confirmations {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background-color: rgb(26, 26, 26);
    border: 1px solid rgb(38, 38, 38);
    border-radius: 10px;
    flex: 1;
}

.crypto-confirmations-spinner {
    width: 40px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
}

.crypto-confirmations-circle {
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
}

.crypto-confirmations-circle-bg {
    fill: none;
    stroke: rgba(58, 194, 112, 0.5);
    stroke-width: 3;
}

.crypto-confirmations-circle-progress {
    fill: none;
    stroke: #3AC270;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 28.275 84.825;
    animation: confirmationSpin 1.5s linear infinite;
    transform-origin: center;
}

@keyframes confirmationSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.crypto-confirmations-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crypto-confirmations-label {
    font-size: 12px;
    color: rgb(161, 161, 170);
    font-weight: 500;
}

.crypto-confirmations-text {
    font-size: 16px;
    font-weight: 600;
    color: rgb(243, 243, 243);
}

/* Address Section */
.crypto-address-section {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
}

.crypto-qr-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: white;
    border-radius: 8px;
    width: 120px;
    height: 120px;
}

.crypto-qr-code {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crypto-qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.crypto-address-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crypto-address-label {
    font-size: 12px;
    font-weight: 600;
    color: rgb(161, 161, 170);
    letter-spacing: 0.3px;
}

.crypto-address-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgb(20, 20, 20);
    border: 1px solid rgb(38, 38, 38);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.crypto-address-box:hover {
    background-color: rgb(26, 26, 26);
}

.crypto-address-text {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: rgb(243, 243, 243);
    word-break: break-all;
}

.crypto-copy-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: rgb(161, 161, 170);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    position: relative;
}

.crypto-copy-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgb(243, 243, 243);
}

.crypto-copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Security Badge */
.crypto-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: rgb(161, 161, 170);
    margin-top: 8px;
}

.crypto-security-icon {
    width: 14px;
    height: 14px;
}

/* Copy Notification */
.crypto-copy-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgb(38, 38, 38);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100001;
    pointer-events: none;
}

.crypto-copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.crypto-copy-notification-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(58, 194, 112, 0.15);
    border-radius: 50%;
    flex-shrink: 0;
}

.crypto-copy-notification-icon svg {
    width: 14px;
    height: 14px;
    stroke: #3AC270;
}

.crypto-copy-notification-text {
    font-size: 14px;
    font-weight: 600;
    color: rgb(243, 243, 243);
}
