/**
 * KreativTek Square Payment System - Styles
 * Author: KreativTek
 * Author URI: https://KreativTek.net
 */

.ktsp-payment-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ktsp-branding {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ktsp-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    transition: transform 0.3s ease;
}

.ktsp-logo:hover {
    transform: scale(1.05);
}

.ktsp-powered-by {
    margin: 10px 0 0;
    font-size: 14px;
    color: #6c757d;
}

.ktsp-powered-by a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.ktsp-powered-by a:hover {
    color: #005177;
    text-decoration: underline;
}

.ktsp-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ktsp-form h2 {
    margin: 0 0 25px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.ktsp-form h3 {
    margin: 25px 0 15px;
    color: #555;
    font-size: 18px;
    font-weight: 600;
}

.ktsp-message {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.ktsp-message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.ktsp-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.ktsp-form-section {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ktsp-form-row {
    margin-bottom: 20px;
}

.ktsp-form-row label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.ktsp-form-row input[type="text"],
.ktsp-form-row input[type="email"],
.ktsp-form-row input[type="tel"],
.ktsp-form-row input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.ktsp-form-row input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.ktsp-amount-input {
    position: relative;
}

.ktsp-currency {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: 600;
    font-size: 15px;
}

.ktsp-amount-input input {
    padding-left: 30px;
}

.ktsp-form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .ktsp-form-row-group {
        grid-template-columns: 1fr;
    }
}

.ktsp-payment-info-description {
    margin: 10px 0 15px;
    padding: 12px 15px;
    background: #fff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

#card-container {
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 100px;
}

.ktsp-secure-notice {
    margin: 15px 0 0;
    padding: 10px 15px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 4px;
    font-size: 13px;
    color: #2e7d32;
    line-height: 1.5;
    text-align: center;
}

.ktsp-submit-button {
    width: 100%;
    padding: 14px 20px;
    background: #0073aa;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ktsp-submit-button:hover {
    background: #005177;
}

.ktsp-submit-button:active {
    transform: scale(0.98);
}

.ktsp-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.ktsp-loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Square Card Input Styling */
.sq-input {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: 15px;
}

.sq-input--focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.sq-input--error {
    border-color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ktsp-payment-wrapper {
        padding: 10px;
    }

    .ktsp-form {
        padding: 20px 15px;
    }

    .ktsp-form h2 {
        font-size: 20px;
    }

    .ktsp-logo {
        max-width: 150px;
    }
}

/* Loading state */
.ktsp-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Input validation */
.ktsp-form-row input:invalid {
    border-color: #dc3545;
}

.ktsp-form-row input:valid {
    border-color: #28a745;
}

.ktsp-form-row input:not(:placeholder-shown):invalid {
    border-color: #dc3545;
}

.ktsp-form-row input:not(:placeholder-shown):valid {
    border-color: #28a745;
}
