/* Checkout Modal */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.4s ease;
}

.checkout-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-content {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    background: rgba(10, 10, 10, 0.98);
    border-radius: 24px;
    border: 1px solid rgba(0, 212, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.5s ease;
}

.checkout-header {
    text-align: center;
    padding: 30px 20px 20px;
    flex-shrink: 0;
}

.checkout-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.checkout-subtitle {
    font-size: 13px;
    color: #888;
}

.checkout-apps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 0 20px;
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 20px;
}

.checkout-app {
    background: #111;
    border: 2px solid #222;
    border-radius: 16px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
}

.checkout-app.selected {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.05);
}

.checkout-app:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.checkout-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    background: #000;
    border: 2px solid #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-app.selected .checkout-checkbox {
    background: #00d4ff;
    border-color: #00d4ff;
}

.checkout-app.selected .checkout-checkbox::after {
    content: '✓';
    color: #000;
    font-weight: 700;
    font-size: 12px;
}

.checkout-app-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-app-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-icon {
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.checkout-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.checkout-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.checkout-price {
    font-size: 10px;
    color: #00d4ff;
    font-weight: 600;
    position: absolute;
    bottom: 14px;
    left: 14px;
}

.checkout-summary {
    background: #111;
    border-radius: 20px;
    padding: 20px;
    margin: 0 20px 20px;
    flex-shrink: 0;
}

.checkout-summary-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.checkout-summary-apps {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
}

.checkout-summary-app {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #aaa;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 700;
    color: #00d4ff;
}

.checkout-button {
    display: block;
    width: calc(100% - 40px);
    max-width: 400px;
    margin: 0 auto 20px;
    padding: 14px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    border-radius: 30px;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkout-button:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.checkout-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkout-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.checkout-close svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* Zero-Knowledge Info */
.zero-knowledge-info {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.zero-knowledge-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 8px;
}

.zero-knowledge-icon {
    width: 20px;
    height: 20px;
}

.zero-knowledge-text {
    font-size: 12px;
    color: #aaa;
    line-height: 1.5;
}

/* Checkout Loading State */
.checkout-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.checkout-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 212, 255, 0.2);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

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

.checkout-loading-text {
    font-size: 16px;
    color: #888;
}

/* Desktop adjustments */
@media (min-width: 1024px) {
    .checkout-apps {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large desktop adjustments */
@media (min-width: 1440px) {
    .checkout-apps {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Ultra-wide screen adjustments */
@media (min-width: 1920px) {
    .checkout-content {
        max-width: 1600px;
    }

    .checkout-apps {
        grid-template-columns: repeat(6, 1fr);
        gap: 14px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .checkout-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .checkout-header {
        padding: 20px 15px 15px;
    }

    .checkout-title {
        font-size: 24px;
    }

    .checkout-subtitle {
        font-size: 12px;
    }

    .checkout-apps {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 15px;
    }

    .checkout-app {
        padding: 12px;
        min-height: 110px;
    }

    .checkout-icon {
        font-size: 20px;
    }

    .checkout-name {
        font-size: 12px;
    }

    .checkout-desc {
        font-size: 10px;
    }

    .checkout-summary {
        margin: 0 15px 15px;
        padding: 15px;
    }

    .checkout-summary-title {
        font-size: 16px;
    }

    .checkout-button {
        width: calc(100% - 30px);
        margin: 0 15px 15px;
        font-size: 13px;
        padding: 12px;
    }

    .checkout-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}
