/* TP WooCommerce Test Gateway Styles */

.tp-test-gateway-fields {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tp-test-gateway-fields h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.tp-test-gateway-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.tp-test-gateway-row:last-child {
    margin-bottom: 0;
}

.tp-test-gateway-field {
    flex: 1;
}

.tp-test-gateway-field.half {
    flex: 0 0 48%;
}

.tp-test-gateway-field.quarter {
    flex: 0 0 23%;
}

.tp-test-gateway-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.tp-test-gateway-field input,
.tp-test-gateway-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    transition: border-color 0.3s ease;
}

.tp-test-gateway-field input:focus,
.tp-test-gateway-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.tp-test-gateway-field input.error,
.tp-test-gateway-field select.error {
    border-color: #e2401c;
}

.tp-test-gateway-error {
    color: #e2401c;
    font-size: 0.875em;
    margin-top: 5px;
    display: block;
}

.tp-test-gateway-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 15px;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 14px;
}

.tp-test-gateway-notice.info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.tp-test-gateway-notice.warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.tp-test-gateway-notice strong {
    font-weight: 600;
}

/* Responsive design */
@media (max-width: 768px) {
    .tp-test-gateway-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .tp-test-gateway-field.half,
    .tp-test-gateway-field.quarter {
        flex: 1;
    }
}

/* Loading state */
.tp-test-gateway-loading {
    opacity: 0.6;
    pointer-events: none;
}

.tp-test-gateway-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: tp-test-gateway-spin 1s linear infinite;
}

@keyframes tp-test-gateway-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card type icons */
.tp-test-gateway-card-type {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.tp-test-gateway-field {
    position: relative;
}

.tp-test-gateway-card-type.visa {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCA0MCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI0IiByeD0iNCIgZmlsbD0iIzAwNTFBNSIvPgo8cGF0aCBkPSJNMTYuNzUgN0gxNC4yNUwxMi41IDE3SDE1TDE2Ljc1IDdaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');
}

.tp-test-gateway-card-type.mastercard {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCA0MCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjI0IiByeD0iNCIgZmlsbD0iI0VCMDAxQiIvPgo8Y2lyY2xlIGN4PSIxNSIgY3k9IjEyIiByPSI3IiBmaWxsPSIjRkY1RjAwIi8+CjxjaXJjbGUgY3g9IjI1IiBjeT0iMTIiIHI9IjciIGZpbGw9IiNGRkY1RjAiLz4KPC9zdmc+Cg==');
}

/* Instructions styling */
.tp-test-gateway-instructions {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.tp-test-gateway-instructions h4 {
    color: #0073aa;
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}

.tp-test-gateway-instructions p {
    margin: 0 0 8px 0;
    font-size: 13px;
    line-height: 1.4;
}

.tp-test-gateway-instructions p:last-child {
    margin-bottom: 0;
}

.tp-test-gateway-instructions code {
    background: #fff;
    padding: 2px 4px;
    border-radius: 2px;
    font-family: monospace;
    font-size: 12px;
}

/* Quick Fill Buttons */
.tp-test-gateway-quick-fill {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
}

.tp-test-gateway-quick-fill h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.tp-quick-fill-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tp-quick-fill-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tp-section-label {
    font-size: 12px;
    font-weight: 600;
    min-width: 60px;
}

.tp-section-label.success {
    color: #46b450;
}

.tp-section-label.fail {
    color: #dc3232;
}

.tp-fill-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 70px;
}

.tp-fill-btn.success {
    background: #46b450;
    color: white;
}

.tp-fill-btn.success:hover {
    background: #3a9940;
}

.tp-fill-btn.fail {
    background: #dc3232;
    color: white;
}

.tp-fill-btn.fail:hover {
    background: #c02d2d;
}

.tp-fill-btn:active {
    transform: translateY(1px);
}

/* Responsive design for quick fill */
@media (max-width: 768px) {
    .tp-quick-fill-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .tp-section-label {
        min-width: auto;
    }

    .tp-fill-btn {
        min-width: 80px;
    }
}
