/* ============================================
   Visual Credit Card Display
   ============================================ */

.credit-card-wrapper {
    perspective: 1000px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.credit-card {
    width: 100%;
    max-width: 400px;
    height: 240px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.credit-card.flipped {
    transform: rotateY(180deg);
}

.credit-card-front,
.credit-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    /* Tema rengi gradient: #71ae47 (113, 174, 71) -> daha koyu ton */
    background: linear-gradient(135deg, rgb(var(--color-primary)) 0%, rgba(90, 141, 58, 1) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credit-card-back {
    transform: rotateY(180deg);
    /* Tema rengi gradient: daha koyu ton -> #71ae47 */
    background: linear-gradient(135deg, rgba(90, 141, 58, 1) 0%, rgb(var(--color-primary)) 100%);
}

/* Card Front Elements */
.card-chip {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #f5d76e 0%, #f7dc6f 50%, #f5d76e 100%);
    border-radius: 8px;
    position: relative;
    margin-bottom: 20px;
}

.card-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 2px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1px;
}

.card-logo {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 60px;
    height: 40px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.9;
}

.card-logo.visa {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M9.5 8.5h5v7h-5z"/><path fill="white" d="M12 12l-2-3.5h1.5l1 1.5 1-1.5H16l-2 3.5z"/></svg>');
}

.card-logo.mastercard {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="9" cy="12" r="5" fill="white" opacity="0.8"/><circle cx="15" cy="12" r="5" fill="white" opacity="0.8"/></svg>');
}

.card-logo.amex {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="4" y="6" width="16" height="12" rx="2" fill="white" opacity="0.9"/></svg>');
}

.card-number-display {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1.5px;
    font-family: 'Courier New', monospace;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.card-holder-display {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.card-expiry-display {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Card Back Elements */
.card-stripe {
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    margin-bottom: 20px;
}

.card-cvc-display {
    background: white;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-align: right;
    width: fit-content;
    margin-left: auto;
    letter-spacing: 2px;
}

/* Credit Card Form */
.credit-card-form {
    margin-top: 24px;
}

.credit-card-form .form-group {
    margin-bottom: 20px;
}

.credit-card-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.credit-card-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.credit-card-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
}

.credit-card-form .form-control:focus {
    outline: none;
    border-color: rgb(var(--color-primary));
    box-shadow: 0 0 0 3px rgba(var(--color-primary), 0.1);
}

.credit-card-form #cardNumber {
    font-size: 18px;
    letter-spacing: 2px;
}

.credit-card-form #cardExpiry,
.credit-card-form #cardCvc {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .credit-card {
        max-width: 100%;
        height: 200px;
    }
    
    .card-number-display {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .credit-card-front,
    .credit-card-back {
        padding: 20px;
    }
}

