/**
 * ============================================================================
 * FILE: mint-on-demand.css
 * PATH: /wp-content/themes/astra/xrpl-nft-marketplace/frontend/mint-on-demand.css
 * ============================================================================
 * 
 * Styles for Mint-on-Demand UI components:
 * - Listing cards (marketplace grid)
 * - Purchase modal (3-step flow)
 * - Fee payment modal (for artists)
 * - Purchase history
 * - Toasts and notifications
 * 
 * @version 1.0.0
 */

/* =========================================================================
   CSS VARIABLES
   ========================================================================= */

:root {
    /* IMU Branding Colors */
    --mod-primary: #d4af37;           /* IMU Gold */
    --mod-primary-hover: #00d4ff;     /* Neon Blue for hover */
    --mod-primary-dark: #c9a227;      /* Darker gold */
    --mod-neon-blue: #00d4ff;         /* Neon blue */
    --mod-neon-blue-glow: rgba(0, 212, 255, 0.4);
    
    --mod-success: #10b981;
    --mod-warning: #f59e0b;
    --mod-error: #ef4444;
    --mod-info: #3b82f6;
    
    --mod-bg-dark: #0f0f1a;
    --mod-bg-card: #1a1a2e;
    --mod-bg-elevated: #252540;
    
    --mod-text-primary: #ffffff;
    --mod-text-secondary: #a0a0b0;
    --mod-text-muted: #6b6b80;
    
    --mod-border: rgba(255, 255, 255, 0.1);
    --mod-border-hover: rgba(255, 255, 255, 0.2);
    --mod-border-gold: rgba(212, 175, 55, 0.6);
    
    --mod-radius: 12px;
    --mod-radius-sm: 8px;
    --mod-radius-lg: 16px;
    
    --mod-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --mod-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --mod-shadow-gold: 0 4px 15px rgba(212, 175, 55, 0.2);
}

/* =========================================================================
   MODAL BASE
   ========================================================================= */

.mod-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.mod-modal-content {
    background: var(--mod-bg-card);
    border-radius: var(--mod-radius-lg);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--mod-shadow-lg);
}

.mod-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--mod-text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    z-index: 10;
}

.mod-modal-close:hover {
    color: var(--mod-text-primary);
}

.mod-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--mod-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mod-modal-icon {
    font-size: 1.5rem;
}

.mod-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.mod-modal-body {
    padding: 1.5rem;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */

.mod-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--mod-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.mod-btn-primary {
    background: var(--mod-primary);
    color: white;
}

.mod-btn-primary:hover {
    background: var(--mod-primary-hover);
    transform: translateY(-1px);
}

.mod-btn-secondary {
    background: var(--mod-bg-elevated);
    color: var(--mod-text-primary);
    border: 1px solid var(--mod-border);
}

.mod-btn-secondary:hover {
    background: var(--mod-bg-card);
    border-color: var(--mod-border-hover);
}

.mod-btn-block {
    display: flex;
    width: 100%;
}

.mod-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.mod-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* =========================================================================
   SPINNER
   ========================================================================= */

.mod-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--mod-primary);
    border-radius: 50%;
    animation: mod-spin 1s linear infinite;
}

.mod-spinner-small {
    width: 16px;
    height: 16px;
    border-width: 2px;
    display: inline-block;
}

@keyframes mod-spin {
    to { transform: rotate(360deg); }
}

/* =========================================================================
   QR CODE CONTAINER
   ========================================================================= */

.mod-qr-container {
    background: white;
    border-radius: var(--mod-radius);
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
}

.mod-qr-container img {
    max-width: 200px;
    height: auto;
}

/* =========================================================================
   POLL STATUS
   ========================================================================= */

.mod-poll-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--mod-text-secondary);
    font-size: 0.9rem;
}

/* =========================================================================
   FEE MODAL SPECIFIC
   ========================================================================= */

.mod-fee-summary {
    background: var(--mod-bg-elevated);
    border-radius: var(--mod-radius-sm);
    padding: 1rem;
    margin: 1rem 0;
}

.mod-fee-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--mod-text-secondary);
}

.mod-fee-item:not(:last-child) {
    border-bottom: 1px solid var(--mod-border);
}

.mod-fee-total {
    font-weight: 600;
    color: var(--mod-text-primary);
    font-size: 1.1rem;
}

.mod-fee-note {
    font-size: 0.85rem;
    color: var(--mod-text-muted);
    margin: 1rem 0;
}

/* =========================================================================
   PURCHASE MODAL SPECIFIC
   ========================================================================= */

.mod-modal-purchase {
    max-width: 520px;
}

/* Progress Steps */
.mod-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 0.5rem;
}

.mod-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.mod-step-active {
    opacity: 1;
}

.mod-step-complete {
    opacity: 0.7;
}

.mod-step-complete .mod-step-number {
    background: var(--mod-success);
}

.mod-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mod-bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--mod-border);
}

.mod-step-active .mod-step-number {
    background: var(--mod-primary);
    border-color: var(--mod-primary);
}

.mod-step-label {
    font-size: 0.75rem;
    color: var(--mod-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mod-step-connector {
    width: 40px;
    height: 2px;
    background: var(--mod-border);
    margin-bottom: 1.5rem;
}

/* Step Content */
.mod-step-content {
    padding: 0 1.5rem 1.5rem;
}

.mod-purchase-summary {
    background: var(--mod-bg-elevated);
    border-radius: var(--mod-radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.mod-purchase-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--mod-text-secondary);
}

.mod-purchase-note {
    font-size: 0.9rem;
    color: var(--mod-text-muted);
    text-align: center;
    margin-bottom: 1rem;
}

/* Minting Animation */
.mod-minting-animation {
    text-align: center;
    padding: 2rem 0;
}

.mod-minting-icon {
    font-size: 3rem;
    animation: mod-pulse 1.5s ease-in-out infinite;
}

@keyframes mod-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.mod-minting-animation h4 {
    margin: 1rem 0 0.5rem;
}

.mod-minting-animation p {
    color: var(--mod-text-secondary);
    margin: 0.5rem 0;
}

.mod-minting-note {
    font-size: 0.85rem;
    color: var(--mod-text-muted);
}

.mod-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--mod-bg-elevated);
    border-radius: 2px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.mod-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mod-primary), var(--mod-success));
    border-radius: 2px;
    animation: mod-progress 2s ease-in-out infinite;
}

@keyframes mod-progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Claim Ready */
.mod-claim-ready {
    text-align: center;
    padding: 1rem 0;
}

.mod-claim-icon {
    font-size: 3rem;
    animation: mod-bounce 1s ease infinite;
}

@keyframes mod-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Success */
.mod-success-animation {
    text-align: center;
    padding: 2rem 0;
}

.mod-success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.mod-success-animation h4 {
    color: var(--mod-success);
    margin-bottom: 0.5rem;
}

/* =========================================================================
   LISTING CARDS (MARKETPLACE)
   ========================================================================= */

#mod-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.mod-listing-card {
    background: var(--mod-bg-card);
    border-radius: var(--mod-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--mod-border);
}

.mod-listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mod-shadow);
    border-color: var(--mod-border-hover);
}

.mod-listing-cover {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--mod-bg-elevated);
}

.mod-listing-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mod-listing-card:hover .mod-listing-cover img {
    transform: scale(1.05);
}

.mod-listing-type {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.5rem;
    border-radius: var(--mod-radius-sm);
    font-size: 1rem;
}

.mod-listing-info {
    padding: 1rem;
}

.mod-listing-name {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-listing-artist {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--mod-text-secondary);
}

.mod-listing-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--mod-text-muted);
    margin-bottom: 1rem;
}

.mod-listing-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--mod-border);
}

.mod-listing-price {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--mod-text-primary);
}

.mod-mint-btn {
    background: var(--mod-bg-dark);
    color: var(--mod-primary);
    border: 2px solid var(--mod-primary);
    padding: 0.6rem 1.2rem;
    border-radius: var(--mod-radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.mod-mint-btn:hover {
    background: var(--mod-neon-blue);
    color: #000;
    border-color: var(--mod-neon-blue);
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--mod-neon-blue-glow), 0 0 40px var(--mod-neon-blue-glow);
}

.mod-mint-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 10px var(--mod-neon-blue-glow);
}

.mod-mint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =========================================================================
   PURCHASE HISTORY
   ========================================================================= */

.mod-purchase-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mod-purchase-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--mod-bg-card);
    border-radius: var(--mod-radius);
    padding: 1rem;
    border: 1px solid var(--mod-border);
}

.mod-purchase-cover {
    width: 60px;
    height: 60px;
    border-radius: var(--mod-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.mod-purchase-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mod-purchase-details {
    flex: 1;
    min-width: 0;
}

.mod-purchase-details h4 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-purchase-edition,
.mod-purchase-date {
    margin: 0;
    font-size: 0.8rem;
    color: var(--mod-text-muted);
}

.mod-purchase-status {
    flex-shrink: 0;
}

.mod-purchase-actions {
    flex-shrink: 0;
}

/* Badges */
.mod-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.mod-badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--mod-success);
}

.mod-badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--mod-warning);
}

.mod-badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: var(--mod-info);
}

.mod-badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--mod-error);
}

.mod-badge-pending {
    background: rgba(160, 160, 176, 0.2);
    color: var(--mod-text-secondary);
}

/* =========================================================================
   EMPTY & LOADING STATES
   ========================================================================= */

.mod-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--mod-text-secondary);
}

.mod-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    text-align: center;
}

.mod-empty-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.mod-empty p {
    color: var(--mod-text-muted);
    margin: 0;
}

.mod-error {
    text-align: center;
    padding: 2rem;
}

.mod-error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* =========================================================================
   TOAST NOTIFICATIONS
   ========================================================================= */

.mod-toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mod-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--mod-bg-elevated);
    padding: 1rem 1.25rem;
    border-radius: var(--mod-radius-sm);
    box-shadow: var(--mod-shadow);
    animation: mod-toast-in 0.3s ease;
    border-left: 3px solid var(--mod-info);
}

.mod-toast-success {
    border-left-color: var(--mod-success);
}

.mod-toast-error {
    border-left-color: var(--mod-error);
}

.mod-toast-fade {
    animation: mod-toast-out 0.3s ease forwards;
}

@keyframes mod-toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes mod-toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.mod-toast-icon {
    font-size: 1.25rem;
}

.mod-toast-message {
    font-size: 0.9rem;
}

/* =========================================================================
   PAGINATION
   ========================================================================= */

.mod-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

.mod-pagination button {
    background: var(--mod-bg-elevated);
    border: 1px solid var(--mod-border);
    color: var(--mod-text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--mod-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mod-pagination button:hover {
    background: var(--mod-bg-card);
    border-color: var(--mod-primary);
}

.mod-page-info {
    color: var(--mod-text-secondary);
    font-size: 0.9rem;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 640px) {
    .mod-modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .mod-steps {
        padding: 1rem 0.5rem;
    }
    
    .mod-step-label {
        font-size: 0.65rem;
    }
    
    .mod-step-connector {
        width: 20px;
    }
    
    #mod-listings-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .mod-purchase-item {
        flex-wrap: wrap;
    }
    
    .mod-purchase-status,
    .mod-purchase-actions {
        width: 100%;
        margin-top: 0.5rem;
    }
}


/**
 * PHASE 2 CSS: Quantity Selector, Preview Modal, Card Sizing
 */

/* =========================================================================
   MODAL OVERLAY (Shared)
   ========================================================================= */

.imc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    padding: 1rem;
}

.imc-modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.imc-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    z-index: 10;
    transition: color 0.2s;
}

.imc-modal-close:hover {
    color: #fff;
}

/* =========================================================================
   QUANTITY MODAL (XRP.cafe style)
   ========================================================================= */

.imc-quantity-modal {
    padding: 2rem;
    text-align: center;
}

.imc-modal-preview {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.imc-modal-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imc-preview-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.85);
    color: #d4af37;
    border: 1px solid #d4af37;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.imc-preview-btn:hover {
    background: #d4af37;
    color: #0f0f1a;
}

.imc-modal-title {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 600;
}

.imc-quantity-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.imc-quantity-group,
.imc-total-group {
    flex: 1;
    text-align: left;
}

.imc-quantity-group label,
.imc-total-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #a0a0b0;
    font-size: 0.85rem;
}

.imc-quantity-selector {
    display: flex;
    align-items: center;
    background: #0f0f1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.imc-qty-btn {
    background: #252540;
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.imc-qty-btn:hover {
    background: #d4af37;
    color: #0f0f1a;
}

#mint-qty-input {
    width: 60px;
    height: 44px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    background: #0f0f1a;
    border: none;
    color: #fff;
}

#mint-qty-input::-webkit-inner-spin-button,
#mint-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.imc-total-display {
    background: #0f0f1a;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.3);
    text-align: center;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imc-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.imc-btn-mint {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #000;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.imc-btn-mint:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.imc-btn-cancel {
    background: transparent;
    color: #a0a0b0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.imc-btn-cancel:hover {
    border-color: #a0a0b0;
    color: #fff;
}

/* =========================================================================
   PREVIEW MODAL
   ========================================================================= */

.imc-preview-modal {
    max-width: 500px;
    padding: 1.5rem;
}

.imc-preview-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.imc-preview-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: #fff;
}

.imc-preview-badge {
    display: inline-block;
    background: #0f0f1a;
    color: #d4af37;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.imc-preview-player {
    margin-bottom: 1rem;
}

.imc-audio-player {
    background: #0f0f1a;
    border-radius: 12px;
    padding: 1rem;
}

.imc-audio-cover {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1rem;
    display: block;
    border-radius: 8px;
}

.imc-no-preview {
    text-align: center;
    padding: 2rem;
}

.imc-preview-note {
    text-align: center;
    color: #6b6b80;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* =========================================================================
   LISTING CARD GRID FIX - Prevent oversized single cards
   ========================================================================= */

.mint-listings-section {
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.mint-listings-title {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #d4af37;
}

/* Force proper grid even with single item */
.mint-listings-grid,
#mod-listings-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(250px, 320px)) !important;
    gap: 1.5rem !important;
    padding: 1rem !important;
    justify-content: center !important;
}

/* Limit max card width - THIS IS THE KEY FIX */
.mod-listing-card {
    max-width: 320px !important;
    width: 100% !important;
}

/* =========================================================================
   PROGRESS BAR ENHANCEMENT (XRP.cafe style)
   ========================================================================= */

.mint-status-banner {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f1a 100%);
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.mint-banner-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.mint-banner-status {
    flex-shrink: 0;
}

.mint-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.mint-badge-live {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.mint-badge-sold-out {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.mint-banner-progress {
    flex: 1;
    min-width: 200px;
}

.mint-progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #a0a0b0;
}

.mint-progress-stats strong {
    color: #fff;
}

.mint-progress-percent {
    color: #d4af37;
    font-weight: 600;
}

.mint-progress-bar-wrapper {
    width: 100%;
    height: 10px;
    background: #0f0f1a;
    border-radius: 5px;
    overflow: hidden;
}

.mint-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #22c55e);
    border-radius: 5px;
    transition: width 0.5s ease;
    position: relative;
}

.mint-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.mint-banner-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.mint-price-info {
    text-align: right;
}

.mint-price-label {
    display: block;
    font-size: 0.8rem;
    color: #6b6b80;
}

.mint-price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #d4af37;
}

.mint-banner-btn {
    background: linear-gradient(135deg, #d4af37 0%, #c9a227 100%);
    color: #0f0f1a;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mint-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.mint-secondary-note {
    color: #6b6b80;
    font-style: italic;
}

/* =========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================= */

@media (max-width: 768px) {
    .mint-banner-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .mint-banner-action {
        flex-direction: column;
        width: 100%;
    }
    
    .mint-price-info {
        text-align: center;
    }
    
    .mint-banner-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .imc-quantity-row {
        flex-direction: column;
    }
    
    .imc-modal-preview {
        width: 150px;
        height: 150px;
    }
    
    .imc-modal-content {
        padding: 1.5rem;
    }
    
    .mint-listings-grid,
    #mod-listings-grid {
        grid-template-columns: 1fr !important;
    }
    
    .mod-listing-card {
        max-width: 100% !important;
    }
}


/**
 * =============================================================================
 * IMC PHASE 3: MODAL POSITIONING EMERGENCY FIX
 * =============================================================================
 * 
 * Add this to the END of mint-on-demand.css
 * This fixes the modal appearing inline/below footer instead of as fixed overlay
 * 
 * Root cause: Parent elements with CSS transforms break `position: fixed`
 * Solution: Use !important to force correct positioning
 */

/* =============================================================================
   FORCE MODAL OVERLAY TO BE PROPERLY POSITIONED
   ============================================================================= */

/* Target all possible modal ID patterns */
#imc-mint-modal,
#imc-preview-modal,
#mint-quantity-modal,
#mint-preview-modal,
.imc-modal-overlay,
[id*="mint-modal"],
[id*="preview-modal"] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 1rem !important;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
    transform: none !important; /* Reset any inherited transforms */
}

/* Modal content box styling */
#imc-mint-modal > div,
#imc-preview-modal > div,
#mint-quantity-modal > div,
#mint-preview-modal > div,
.imc-modal-box,
.imc-modal-content,
[class*="modal-content"] {
    position: relative !important;
    background: linear-gradient(145deg, #1e1e30, #151520) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 16px !important;
    max-width: 440px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                0 0 40px rgba(212, 175, 55, 0.1) !important;
    animation: modalSlideUp 0.25s ease-out !important;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =============================================================================
   LISTING CARD GRID FIX - Prevent Oversized Cards
   ============================================================================= */

.mint-listings-section {
    padding: 2rem 1rem !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
}

.mint-listings-title {
    text-align: center !important;
    margin-bottom: 1.5rem !important;
    font-size: 1.25rem !important;
    color: #d4af37 !important;
}

.mint-listings-grid,
#mod-listings-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 300px)) !important;
    gap: 1.5rem !important;
    justify-content: center !important;
    padding: 0 !important;
}

.mod-listing-card {
    max-width: 300px !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */

@media (max-width: 480px) {
    #imc-mint-modal > div,
    #imc-preview-modal > div,
    .imc-modal-box,
    .imc-modal-content {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    .mint-listings-grid,
    #mod-listings-grid {
        grid-template-columns: 1fr !important;
    }
    
    .mod-listing-card {
        max-width: 100% !important;
    }
}

/* =============================================================================
   END PHASE 3 FIXES
   ============================================================================= */

/* =========================================================================
   PHASE 4 ADDITIONS — Quantity Selector, Multi-Claim, Tier Badges
   ========================================================================= */

/* ── Quantity Selector ───────────────────────────────────────────────────── */

.mod-qty-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--mod-bg-elevated);
    border-radius: var(--mod-radius-sm);
    margin: 16px 0 8px;
}

.mod-qty-selector label {
    font-size: 14px;
    color: var(--mod-text-secondary);
    font-weight: 500;
}

.mod-qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mod-qty-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--mod-border-gold);
    background: transparent;
    color: var(--mod-primary);
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mod-qty-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--mod-primary);
}

.mod-qty-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mod-qty-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--mod-text-primary);
    min-width: 32px;
    text-align: center;
}


/* ── Tier Notice ─────────────────────────────────────────────────────────── */

.mod-tier-notice {
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--mod-radius-sm);
    font-size: 13px;
    color: var(--mod-warning);
    margin: 12px 0;
    text-align: center;
}


/* ── Multi-Claim List ────────────────────────────────────────────────────── */

.mod-claim-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
    max-height: 300px;
    overflow-y: auto;
}

.mod-claim-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--mod-bg-elevated);
    border-radius: var(--mod-radius-sm);
    border: 1px solid var(--mod-border);
    transition: border-color 0.2s;
}

.mod-claim-item:hover {
    border-color: var(--mod-border-hover);
}

.mod-claim-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.mod-claim-edition {
    font-size: 14px;
    font-weight: 600;
    color: var(--mod-text-primary);
}

.mod-claim-tier {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ── Tier Badge ──────────────────────────────────────────────────────────── */

.mod-tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--mod-primary);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ── Listing Card: Tiered + Sold Out Badges ──────────────────────────────── */

.mod-listing-tiered {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    background: rgba(245, 158, 11, 0.9);
    color: #000;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

.mod-listing-soldout {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 8px 20px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 3;
}

.mod-btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mod-btn-claimed {
    background: var(--mod-success) !important;
    border-color: var(--mod-success) !important;
    cursor: default;
    opacity: 0.8;
}


/* ── Purchase History Row (updated) ──────────────────────────────────────── */

.mod-purchase-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--mod-bg-elevated);
    border-radius: var(--mod-radius-sm);
    border: 1px solid var(--mod-border);
    margin-bottom: 8px;
}

.mod-purchase-row .mod-purchase-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.mod-purchase-row .mod-purchase-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mod-purchase-row .mod-purchase-details {
    flex: 1;
    min-width: 0;
}

.mod-purchase-row .mod-purchase-details h4 {
    font-size: 14px;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mod-purchase-edition {
    font-size: 12px;
    color: var(--mod-text-secondary);
    margin: 0;
}

.mod-purchase-date {
    font-size: 11px;
    color: var(--mod-text-muted);
    margin: 0;
}


/* ── Badge: muted variant ────────────────────────────────────────────────── */

.mod-badge-muted {
    background: rgba(107, 107, 128, 0.15);
    color: var(--mod-text-muted);
}


/* ── Step 0 (Select) active state ────────────────────────────────────────── */

.mod-step[data-step="0"].mod-step-active .mod-step-number {
    background: var(--mod-primary);
    color: #000;
}

.mod-step[data-step="0"].mod-step-complete .mod-step-number {
    background: var(--mod-success);
    color: #fff;
}


/* ── Responsive tweaks for claim list ────────────────────────────────────── */

@media (max-width: 480px) {
    .mod-claim-item {
        padding: 10px 12px;
    }
    .mod-claim-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .mod-qty-controls {
        gap: 8px;
    }
    .mod-qty-value {
        font-size: 18px;
    }
}