/**
 * VSafe WooCommerce Gateway - Checkout Styles
 */

/* Credit Card Form Container */
#vsafe-cc-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

/* Form Row Styling */
#vsafe-cc-form .form-row {
    margin-bottom: 15px;
}

/* Label Styling */
#vsafe-cc-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

#vsafe-cc-form label .required {
    color: #dc2626;
    font-weight: bold;
}

/* Input Field Styling */
#vsafe-cc-form input[type="text"],
#vsafe-cc-form input[type="tel"],
#vsafe-cc-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#vsafe-cc-form input[type="text"]:focus,
#vsafe-cc-form input[type="tel"]:focus,
#vsafe-cc-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Card Number Field */
#vsafe_card_number {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    letter-spacing: 1px;
}

/* CVV Field */
#vsafe_card_cvv {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    text-align: center;
}

/* Card Brand Indicator */
#vsafe-card-brand {
    margin-top: 8px;
    min-height: 32px;
}

#vsafe-card-brand img {
    height: 32px;
    width: auto;
    display: inline-block;
}

/* Select Dropdown Styling */
#vsafe-cc-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* Two Column Layout for Expiry Fields */
#vsafe-cc-form .form-row-first {
    width: 48%;
    float: left;
    margin-right: 4%;
}

#vsafe-cc-form .form-row-last {
    width: 48%;
    float: right;
}

/* Clear Fix */
#vsafe-cc-form .clear {
    clear: both;
}

/* Error Styling */
#vsafe-cc-form input.woocommerce-invalid,
#vsafe-cc-form select.woocommerce-invalid {
    border-color: #dc2626;
}

#vsafe-cc-form input.woocommerce-invalid:focus,
#vsafe-cc-form select.woocommerce-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Placeholder Styling */
#vsafe-cc-form input::placeholder {
    color: #9ca3af;
}

/* Security Icons */
.vsafe-security-icons {
    margin-top: 15px;
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.vsafe-security-icons img {
    height: 24px;
    width: auto;
    margin: 0 5px;
    opacity: 0.7;
}

/* Card Type Icons */
.vsafe-card-types {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vsafe-card-types img {
    height: 28px;
    width: auto;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 4px;
}

/* Loading State */
#vsafe-cc-form.vsafe-processing {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #vsafe-cc-form .form-row-first,
    #vsafe-cc-form .form-row-last {
        width: 100%;
        float: none;
        margin-right: 0;
    }
    
    #vsafe-cc-form {
        padding: 15px;
    }
}

/* Accessibility */
#vsafe-cc-form input:disabled,
#vsafe-cc-form select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Success Animation */
@keyframes vsafe-success {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

#vsafe-cc-form.vsafe-success {
    animation: vsafe-success 0.3s ease;
    border-color: #10b981;
    background: #f0fdf4;
}

/* Smooth Transitions */
#vsafe-cc-form * {
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
