/* ============================================================
   4Cs SSIS – Card Payment Form  (fourcs-ssis-wp)
   ============================================================ */

/* Scope everything under .fc-wrap so we never clash with themes */
.fc-wrap {
    max-width: 480px;
    margin: 36px auto;
    padding: 0 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #1a2030;
    box-sizing: border-box;
}

.fc-wrap *, .fc-wrap *::before, .fc-wrap *::after {
    box-sizing: inherit;
}

/* Card shell */
.fc-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* Header */
.fc-header {
    background: linear-gradient(135deg, #0d9488 0%, #0e7490 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.fc-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.fc-badge {
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    white-space: nowrap;
}

.fc-badge--live {
    background: rgba(255, 255, 255, 0.25);
}

.fc-badge--test {
    background: rgba(251, 191, 36, 0.3);
    color: #fef3c7;
}

/* Body */
.fc-body {
    padding: 24px;
}

/* Fields */
.fc-field {
    margin-bottom: 18px;
}

.fc-field label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 7px;
}

.fc-currency-label {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}

.fc-field input {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1a2030;
    background: #fafafa;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    outline: none;
    appearance: none;
    -moz-appearance: textfield;
}

.fc-field input:focus {
    border-color: #0d9488;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.fc-field input::placeholder {
    color: #c4cdd8;
}

/* Remove browser number arrows */
.fc-field input[type="number"]::-webkit-inner-spin-button,
.fc-field input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Amount field with currency prefix */
.fc-amount-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.fc-amount-prefix {
    position: absolute;
    left: 13px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    pointer-events: none;
    user-select: none;
}

.fc-amount-wrap input {
    padding-left: 46px;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.fc-hint {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 5px;
}

/* Card number with icon */
.fc-card-number-wrap {
    position: relative;
}

.fc-card-number-wrap input {
    padding-right: 44px;
    letter-spacing: 0.08em;
}

.fc-card-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0bec5;
    pointer-events: none;
    display: flex;
    align-items: center;
}

/* Two-column row */
.fc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* CVV hint button */
.fc-cvv-hint-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #94a3b8;
    background: transparent;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1;
}

.fc-cvv-hint-btn:hover {
    background: #f1f5f9;
    border-color: #64748b;
}

/* Submit button */
.fc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d9488 0%, #0e7490 100%);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    letter-spacing: 0.02em;
    margin-top: 4px;
}

.fc-btn:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
}

.fc-btn:active:not(:disabled) {
    transform: translateY(0);
}

.fc-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.fc-btn--outline {
    background: transparent;
    border: 2px solid #0d9488;
    color: #0d9488;
    margin-top: 18px;
}

.fc-btn--outline:hover:not(:disabled) {
    background: #f0fdfb;
}

/* Spinner */
.fc-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fc-spin 0.7s linear infinite;
}

.fc-btn--outline .fc-btn-spinner {
    border-color: rgba(13, 148, 136, 0.3);
    border-top-color: #0d9488;
}

@keyframes fc-spin {
    to { transform: rotate(360deg); }
}

/* Result banners */
.fc-result {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.fc-result--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #7f1d1d;
}

.fc-result--success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #14532d;
}

/* Success panel */
.fc-success-panel {
    text-align: center;
    padding: 10px 0 6px;
}

.fc-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488 0%, #0e7490 100%);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 14px;
}

.fc-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 18px;
}

.fc-success-details {
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 6px;
    text-align: left;
}

.fc-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}

.fc-detail-row:last-child {
    border-bottom: none;
}

.fc-detail-row span {
    color: #64748b;
}

.fc-detail-row strong {
    color: #0f172a;
    font-weight: 600;
    word-break: break-all;
    text-align: right;
    margin-left: 12px;
}

/* Footer */
.fc-footer {
    padding: 12px 24px;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.fc-tran-type {
    font-style: italic;
}

/* Responsive */
@media (max-width: 520px) {
    .fc-wrap {
        padding: 0 8px;
    }

    .fc-body {
        padding: 18px 16px;
    }

    .fc-header {
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .fc-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .fc-footer {
        padding: 10px 16px;
    }
}
