/* Donasi Page Styles */
.card-item {
    min-height: 180px;
    height: auto;
    width: 100%;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    color: #fff;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

@media (min-width: 640px) {
    .card-item {
        height: 200px;
    }
}

.card-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
}

.card-item:hover::before {
    animation: shine 0.9s;
}

@keyframes shine {
    0% {
        left: -75%;
    }
    100% {
        left: 125%;
    }
}

.card-item:hover {
    transform: scale(1.03);
}

.card-item.active {
    box-shadow: 0 0 0 3px #f68f28, 0 0 20px rgba(246, 143, 40, 0.4);
    transform: scale(1.04);
    transition: 0.3s;
}

/* Dark mode enhancement for active card */
.dark .card-item.active {
    box-shadow: 0 0 0 3px #f68f28, 0 0 20px rgba(246, 143, 40, 0.6);
}

.card-item__wrapper {
    position: absolute;
    inset: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-item__chip {
    width: 36px;
    opacity: 0.9;
}

.card-item__type {
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (min-width: 640px) {
    .card-item__type {
        font-size: 16px;
    }
}

.card-item__number {
    font-family: "Roboto Mono", "Courier New", monospace;
    font-size: 14px;
    letter-spacing: 1.5px;
    margin-top: 12px;
    font-weight: 500;
}

@media (min-width: 640px) {
    .card-item__number {
        font-size: 15px;
    }
}

.card-item__holder {
    font-size: 10px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.card-item__name {
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

@media (min-width: 640px) {
    .card-item__name {
        font-size: 14px;
    }
}

/* Primary color utilities */
.text-primary {
    color: #f68f28 !important;
}

.bg-primary {
    background-color: #f68f28 !important;
}

.border-primary {
    border-color: #f68f28 !important;
}

.ring-primary {
    --tw-ring-color: #f68f28 !important;
}

/* Primary color hover states */
.hover-primary:hover {
    color: #f68f28;
    transition: color 0.3s ease;
}

.hover-bg-primary:hover {
    background-color: #f68f28;
    transition: background-color 0.3s ease;
}

/* Primary color gradients */
.gradient-primary {
    background: linear-gradient(135deg, #f68f28 0%, #e67e22 100%);
}

.gradient-primary-soft {
    background: linear-gradient(135deg, #fef7ed 0%, #fed7aa 100%);
}

.dark .gradient-primary-soft {
    background: linear-gradient(135deg, #292524 0%, #1c1917 100%);
}

/* Gradient backgrounds for better dark mode support */
.bg-gradient-primary-light {
    background: linear-gradient(135deg, #fff5e6, #fef3e2);
}

.dark .bg-gradient-primary-light {
    background: linear-gradient(135deg, #1f1f1f, #2d2d2d);
}

.bg-gradient-primary-card {
    background: linear-gradient(135deg, #fef7ed, #fed7aa);
}

.dark .bg-gradient-primary-card {
    background: linear-gradient(135deg, #292524, #1c1917);
}

/* Enhanced primary button styles */
.btn-primary {
    background: linear-gradient(135deg, #f68f28, #e67e22);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(246, 143, 40, 0.3);
}

.dark .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(246, 143, 40, 0.5);
}

/* Enhanced WhatsApp button */
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128c7e, #075e54);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.dark .btn-whatsapp:hover {
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

/* Copy button enhancement */
.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Card selection ring enhancement */
.card-selected {
    outline: 3px solid #f68f28;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px #f68f28, 0 0 20px rgba(246, 143, 40, 0.4);
}

.dark .card-selected {
    outline-color: #f68f28;
    box-shadow: 0 0 0 3px #f68f28, 0 0 20px rgba(246, 143, 40, 0.6);
}

/* Enhanced text shadows for better readability */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* QR Code container enhancement */
.qr-container {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark .qr-container {
    background: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Loading and error states */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .loading-placeholder {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .card-item {
        min-height: 160px;
    }

    .card-item__wrapper {
        padding: 12px;
    }

    .card-item__type {
        font-size: 14px;
    }

    .card-item__number {
        font-size: 13px;
        letter-spacing: 1px;
    }
}

/* Accessibility improvements */
.card-item:focus {
    outline: 2px solid #f68f28;
    outline-offset: 2px;
}

.copy-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 1px;
}

/* Animation for copied message */
.copied-message {
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    20%,
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Toast notification styles */
#donasi-toast {
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark #donasi-toast {
    border: 1px solid rgba(0, 0, 0, 0.2);
}

/* Enhanced card hover effects for better UX */
.card-item {
    will-change: transform;
}

.card-item:hover {
    animation: cardHover 0.3s ease-in-out;
}

@keyframes cardHover {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1.03);
    }
}

/* Improved focus states for accessibility */
.card-item:focus-visible {
    outline: 2px solid #f68f28;
    outline-offset: 4px;
}

.copy-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Enhanced loading states */
.qr-loading {
    position: relative;
    overflow: hidden;
}

.qr-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(246, 143, 40, 0.2),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
