/* ============================================================
   Dummy Credit Card Gateway — Checkout Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ---- Fieldset wrapper ---- */
#dccg-cc-form {
    border: none;
    padding: 0;
    margin: 12px 0 0;
}

.dccg-description {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.dccg-blocks-wrap {
    width: 100%;
    padding: 16px 0 4px;
    color: #111827;
}

.dccg-block-field {
    display: block;
    margin: 0 0 14px;
}

.dccg-blocks-wrap .dccg-label,
.dccg-blocks-wrap .dccg-input {
    opacity: 1 !important;
    visibility: visible !important;
}

.dccg-block-label {
    color: inherit !important;
    opacity: 1 !important;
}

/* ---- Card Preview ---- */
.dccg-card-preview {
    width: 100%;
    max-width: 340px;
    height: 195px;
    margin: 0 auto 24px;
    perspective: 1000px;
    position: relative;
}

.dccg-card-front,
.dccg-card-back {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 20px 22px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 20px 45px rgba(0, 0, 0, .32);
    color: #fff !important;
}

.dccg-card-front {
    background: linear-gradient(135deg, #1e3a5f 0%, #1a2e4a 45%, #0d1f35 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: rotateY(0deg);
    overflow: hidden;
}

/* Holographic shimmer effect */
.dccg-card-front::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,.07) 0%,
        transparent 40%,
        rgba(255,255,255,.03) 70%,
        transparent 100%
    );
    pointer-events: none;
}

.dccg-card-back {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dccg-card-preview.is-flipped .dccg-card-front { transform: rotateY(-180deg); }
.dccg-card-preview.is-flipped .dccg-card-back  { transform: rotateY(0deg); }

/* Header row */
.dccg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Chip */
.dccg-chip {
    width: 38px;
    height: 28px;
    background: linear-gradient(135deg, #c8a84b 0%, #f0d080 45%, #a07830 100%);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 4px 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.dccg-chip-line {
    height: 2px;
    background: rgba(0,0,0,.2);
    border-radius: 1px;
}

/* Network logo */
.dccg-network-badge svg {
    height: 24px;
    width: auto;
    display: block;
}

/* Card number */
.dccg-card-number-display {
    font-family: 'Space Mono', monospace;
    font-size: 18px;
    letter-spacing: 2.5px;
    color: #fff !important;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
.dccg-card-footer {
    display: flex;
    gap: 24px;
}

.dccg-card-field-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dccg-card-field-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,.82) !important;
    font-family: 'Inter', sans-serif;
}

.dccg-card-field-val {
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: .8px;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

/* Back of card */
.dccg-magstripe {
    height: 38px;
    background: linear-gradient(90deg, #000, #111);
    margin: 0 -22px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.dccg-signature-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 4px;
}

.dccg-sig-lines {
    flex: 1;
    height: 36px;
    background: repeating-linear-gradient(
        0deg,
        #e5e7eb 0px,
        #e5e7eb 4px,
        #f9fafb 4px,
        #f9fafb 8px
    );
    border-radius: 4px;
    border: 1px solid #d1d5db;
}

.dccg-cvv-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.dccg-cvv-val {
    background: #fff;
    color: #111;
    font-family: 'Space Mono', monospace;
    font-size: 15px;
    letter-spacing: 4px;
    padding: 6px 14px;
    border-radius: 5px;
    min-width: 70px;
    text-align: center;
}

/* ---- Form Fields ---- */
.dccg-form-fields {
    font-family: 'Inter', sans-serif;
}

.dccg-field-row {
    margin-bottom: 14px;
}

.dccg-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dccg-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #6b7280;
    margin-bottom: 6px;
}

.dccg-label .required {
    color: #ef4444;
}

.dccg-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.dccg-input {
    width: 100% !important;
    padding: 11px 42px 11px 14px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    color: #111827 !important;
    background: #f9fafb !important;
    transition: border-color .2s, box-shadow .2s, background .2s !important;
    outline: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.dccg-field-row > .dccg-input {
    padding-right: 14px !important;
}

.dccg-input:focus {
    border-color: #4f46e5 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .1) !important;
}

.dccg-input.dccg-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .08) !important;
}

.dccg-input.dccg-valid {
    border-color: #10b981 !important;
}

.dccg-input-icon {
    position: absolute;
    right: 12px;
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.dccg-input-icon svg {
    width: 18px;
    height: 18px;
}

.dccg-error {
    display: block;
    font-size: 11px;
    color: #ef4444;
    font-weight: 500;
    margin-top: 4px;
    min-height: 15px;
}

/* CVV help icon */
.dccg-cvv-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #9ca3af;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    cursor: default;
    margin-left: 5px;
    vertical-align: middle;
    font-style: normal;
    line-height: 1;
}

/* Secure badge */
.dccg-secure-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

.dccg-secure-badge svg {
    width: 15px;
    height: 15px;
    stroke: #10b981;
    flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .dccg-card-preview { max-width: 100%; height: 175px; }
    .dccg-card-number-display { font-size: 15px; letter-spacing: 1.5px; }
    .dccg-two-col { grid-template-columns: 1fr; }
}
