/**
 * WBK Forms Frontend Styles
 *
 * @package WBK_Forms
 */

/* Container */
.wbk-form-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Title & Description */
.wbk-form-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.wbk-form-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

/* Form */
.wbk-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Fields */
.wbk-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wbk-field-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.wbk-required {
    color: #e53935;
    margin-left: 3px;
}

/* Inputs */
.wbk-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.wbk-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.wbk-input::placeholder {
    color: #aaa;
}

.wbk-input-textarea {
    resize: vertical;
    min-height: 120px;
}

/* reCAPTCHA */
.wbk-recaptcha {
    margin-bottom: 15px;
}

/* Submit Button */
.wbk-form-submit {
    margin-top: 10px;
}

.wbk-form-submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wbk-form-submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.wbk-form-submit-button:active {
    transform: translateY(0);
}

.wbk-form-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.wbk-form-submit-button.wbk-loading {
    position: relative;
    color: transparent;
}

.wbk-form-submit-button.wbk-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wbk-spin 0.8s linear infinite;
}

@keyframes wbk-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error & Success Messages */
.wbk-field-error {
    font-size: 0.85em;
    color: #e53935;
    min-height: 1.5em;
}

.wbk-form-messages {
    margin-top: 15px;
}

.wbk-message {
    padding: 15px;
    border-radius: 6px;
    font-size: 0.95em;
}

.wbk-message-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.wbk-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Field States */
.wbk-field.wbk-has-error .wbk-input {
    border-color: #e53935;
}

.wbk-field.wbk-has-error .wbk-input:focus {
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

/* Responsive */
@media (max-width: 600px) {
    .wbk-form-container {
        padding: 15px;
    }

    .wbk-form-submit-button {
        width: 100%;
    }
}
