/**
 * Relworx Payments — Frontend Styles
 */

.relworx-payment-wrapper {
    max-width: 480px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.relworx-payment-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.relworx-form-group {
    margin-bottom: 20px;
}

.relworx-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1a202c;
    margin-bottom: 6px;
}

.relworx-required {
    color: #e53e3e;
}

.relworx-form-group input[type="tel"],
.relworx-form-group input[type="number"],
.relworx-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #f7fafc;
    color: #2d3748;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.relworx-form-group input:focus,
.relworx-form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
    background: #fff;
}

.relworx-form-group input.relworx-input-error,
.relworx-form-group textarea.relworx-input-error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

.relworx-field-error {
    display: block;
    color: #e53e3e;
    font-size: 13px;
    margin-top: 4px;
    min-height: 18px;
}

.relworx-field-hint {
    display: block;
    color: #718096;
    font-size: 12px;
    margin-top: 4px;
}

.relworx-submit-group {
    margin-top: 28px;
    margin-bottom: 0;
}

.relworx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    line-height: 1.4;
}

.relworx-btn:active {
    transform: scale(0.98);
}

.relworx-btn-primary {
    background: #2b6cb0;
    color: #ffffff;
    width: 100%;
}

.relworx-btn-primary:hover {
    background: #2c5282;
}

.relworx-btn-primary:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

.relworx-btn-secondary {
    background: #edf2f7;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

.relworx-btn-secondary:hover {
    background: #e2e8f0;
}

/* Spinner */
.relworx-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: relworx-spin 0.6s linear infinite;
}

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

/* Form message (success/error) */
.relworx-form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.relworx-form-message.relworx-msg-success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #22543d;
}

.relworx-form-message.relworx-msg-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #742a2a;
}

/* ---- Tabs ---- */
.relworx-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 0;
}

.relworx-tab {
    flex: 1;
    padding: 12px 16px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    transition: background 0.2s, color 0.2s;
    border-radius: 8px 8px 0 0;
    margin-right: 4px;
}

.relworx-tab:last-child {
    margin-right: 0;
}

.relworx-tab:hover {
    background: #edf2f7;
    color: #2d3748;
}

.relworx-tab-active {
    background: #ffffff;
    color: #2b6cb0;
    border-color: #e2e8f0;
    border-bottom-color: #ffffff;
    position: relative;
    bottom: -2px;
    z-index: 1;
}

.relworx-tab-hidden {
    display: none !important;
}

/* ---- Card-specific ---- */
.relworx-card-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.relworx-card-logo {
    height: 28px;
    width: auto;
    opacity: 0.85;
}

.relworx-card-note {
    font-size: 13px;
    color: #4a5568;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

/* ---- Redirect overlay ---- */
.relworx-redirect-overlay {
    text-align: center;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
}

.relworx-redirect-overlay p {
    font-size: 14px;
    color: #4a5568;
    margin-top: 12px;
}

/* Payment status display (after submission) */
.relworx-payment-status {
    text-align: center;
    padding: 40px 32px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.relworx-status-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.relworx-status-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px;
}

.relworx-status-message {
    font-size: 15px;
    color: #4a5568;
    margin: 0 0 8px;
}

.relworx-status-reference {
    font-size: 13px;
    color: #718096;
    margin: 0 0 24px;
}

.relworx-notice {
    padding: 16px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 8px;
    color: #92400e;
    text-align: center;
}
