/* ============================================
   PAYMENT HISTORY - MODERN PREMIUM DESIGN
   Pure CSS - No @apply needed for Tailwind v4
   ============================================ */

/* Container & Card */
.payment-history-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 0;
    overflow: hidden;
}

.payment-history-header {
    padding: 2rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
overflow: hidden;
    border-bottom: 0;
}

.payment-history-header::before {
content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.payment-history-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.payment-history-title-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-history-icon {
    font-size: 3rem;
    filter: drop-shadow(0 8px 16px rgba(255, 255, 255, 0.3));
}

.payment-history-text h2 {
    font-size: 1.875rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.25rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.payment-history-text p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.payment-history-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #667eea;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Scrollable Container */
.payment-history-scroll-container {
    max-height: 650px;
    overflow-y: auto;
    padding: 1.5rem 2rem;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f5f9;
}

.payment-history-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.payment-history-scroll-container::-webkit-scrollbar-track {
    background-color: #f1f5f9;
    border-radius: 9999px;
}

.payment-history-scroll-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.payment-history-scroll-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5568d3 0%, #6a3f8a 100%);
}

/* Payment Items */
.payment-history-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.payment-history-item {
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
 position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.payment-history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: all 0.5s ease;
}

.payment-history-item.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    box-shadow: 
        0 20px 60px rgba(16, 185, 129, 0.25),
   0 8px 16px rgba(16, 185, 129, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.payment-history-item.active::before {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.payment-history-item.active:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 30px 80px rgba(16, 185, 129, 0.3),
        0 12px 24px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.payment-history-item.cancelled {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 
        0 10px 40px rgba(71, 85, 105, 0.12),
        0 4px 8px rgba(71, 85, 105, 0.08),
  inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.payment-history-item.cancelled::before {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.payment-history-item.cancelled:hover {
    transform: translateY(-2px);
    box-shadow: 
    0 15px 50px rgba(71, 85, 105, 0.15),
   0 6px 12px rgba(71, 85, 105, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Payment Header */
.payment-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.payment-status-container {
  display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 900;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-status-badge.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
 box-shadow: 
        0 8px 24px rgba(16, 185, 129, 0.4),
        0 2px 8px rgba(16, 185, 129, 0.3);
}

.payment-status-badge.active:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 32px rgba(16, 185, 129, 0.5),
 0 4px 12px rgba(16, 185, 129, 0.4);
}

.payment-status-badge.cancelled {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
    box-shadow: 
        0 8px 24px rgba(71, 85, 105, 0.3),
0 2px 8px rgba(71, 85, 105, 0.2);
}

.payment-status-badge.cancelled:hover {
    transform: scale(1.03);
}

.payment-status-icon {
    font-size: 1.25rem;
    font-weight: 900;
}

.payment-amount-container {
    text-align: right;
}

.payment-amount {
    font-size: 2.25rem;
    font-weight: 900;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
 background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.payment-currency-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

/* Payment Details Grid */
.payment-details-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .payment-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .payment-details-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.payment-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  padding: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-detail-item:hover {
 background: rgba(255, 255, 255, 0.95);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(102, 126, 234, 0.15),
   0 2px 8px rgba(102, 126, 234, 0.1);
}

.payment-detail-label {
    font-size: 0.75rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
 align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.payment-detail-label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: inline-block;
}

.payment-detail-value {
 font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.payment-detail-value.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.payment-detail-value.transaction-id {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    display: inline-block;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    color: #475569;
    font-weight: 600;
}

.payment-detail-value.customer-id {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    display: inline-block;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    color: #1e40af;
    font-weight: 700;
}

/* Empty State */
.payment-history-empty {
    padding: 6rem 2rem;
    text-align: center;
}

.payment-history-empty-icon {
  font-size: 5rem;
  margin-bottom: 2rem;
    opacity: 0.4;
}

.payment-history-empty h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 1rem;
}

.payment-history-empty p {
    font-size: 1.125rem;
    color: #64748b;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
    transform: translateY(30px);
  }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.payment-history-item {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
 opacity: 0;
    animation-fill-mode: forwards;
}

.payment-history-item:nth-child(1) { animation-delay: 0.1s; }
.payment-history-item:nth-child(2) { animation-delay: 0.2s; }
.payment-history-item:nth-child(3) { animation-delay: 0.3s; }
.payment-history-item:nth-child(4) { animation-delay: 0.4s; }
.payment-history-item:nth-child(5) { animation-delay: 0.5s; }

.payment-detail-item {
    animation: fadeIn 0.5s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

.payment-detail-item:nth-child(1) { animation-delay: 0.2s; }
.payment-detail-item:nth-child(2) { animation-delay: 0.25s; }
.payment-detail-item:nth-child(3) { animation-delay: 0.3s; }
.payment-detail-item:nth-child(4) { animation-delay: 0.35s; }
.payment-detail-item:nth-child(5) { animation-delay: 0.4s; }
.payment-detail-item:nth-child(6) { animation-delay: 0.45s; }

/* Pulse effect for active items */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.payment-history-item.active:hover {
    animation: pulse-ring 1.5s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment-history-scroll-container {
        max-height: 550px;
padding: 1.25rem;
    }
    
    .payment-history-header {
        padding: 1.25rem;
 }
    
    .payment-history-item {
        padding: 1.5rem;
    }
    
    .payment-details-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.75rem;
    }
    
    .payment-amount {
        font-size: 1.875rem;
    }
    
    .payment-item-header {
        flex-direction: column;
        align-items: flex-start;
gap: 1rem;
    }
    
    .payment-amount-container {
        text-align: left;
     width: 100%;
  }
    
    .payment-history-icon {
font-size: 2.5rem;
    }
    
    .payment-history-text h2 {
        font-size: 1.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .payment-history-card {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    }
    
    .payment-history-item.active {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    }
    
    .payment-history-item.cancelled {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    
    .payment-amount {
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .payment-detail-value {
        color: #f1f5f9;
    }
    
    .payment-detail-item {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .payment-detail-item:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: #667eea;
    }
}

/* Print Styles */
@media print {
    .payment-history-scroll-container {
  max-height: none;
    overflow: visible;
    }
  
    .payment-history-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .payment-history-header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid black;
    }
}

/* Accessibility */
.payment-history-item:focus-within {
    outline: 4px solid #667eea;
    outline-offset: 4px;
}

/* Loading State */
.payment-history-loading {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.payment-history-loading-item {
    height: 12rem;
    border-radius: 24px;
    background: linear-gradient(
        90deg,
        #f1f5f9 0%,
        #e2e8f0 50%,
        #f1f5f9 100%
    );
background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0%, 100% {
      opacity: 1;
    }
 50% {
        opacity: .5;
    }
}
