/* WR Contact Forms - Frontend Styles */

.wr-cf-wrapper {
    max-width: 100%;
}

.wr-cf-form-container {
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.wr-cf-header {
    margin-bottom: 24px;
}

.wr-cf-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.wr-cf-subtitle {
    font-size: 14px;
    margin: 0;
    opacity: 0.7;
}

.wr-cf-success-message {
    display: none;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 15px;
    text-align: center;
    animation: wrCfFadeIn 0.4s ease;
}

.wr-cf-form {
    margin: 0;
}

.wr-cf-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.wr-cf-field {
    width: 100%;
}

.wr-cf-field-full {
    width: 100%;
}

.wr-cf-field-half {
    width: calc(50% - 8px);
}

.wr-cf-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.wr-cf-required {
    color: #e74c3c;
}

.wr-cf-form input,
.wr-cf-form textarea,
.wr-cf-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.wr-cf-form input:focus,
.wr-cf-form textarea:focus,
.wr-cf-form select:focus {
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.wr-cf-form textarea {
    resize: vertical;
    min-height: 80px;
}

.wr-cf-checkbox-group,
.wr-cf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wr-cf-checkbox-label,
.wr-cf-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.wr-cf-checkbox-label input,
.wr-cf-radio-label input {
    width: auto;
    margin: 0;
}

.wr-cf-math-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    font-size: 14px;
}

.wr-cf-math-field input[type="number"] {
    width: 80px;
    flex-shrink: 0;
    padding: 8px 10px;
}

.wr-cf-terms {
    margin: 16px 0;
}

.wr-cf-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

.wr-cf-terms-label input {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

.wr-cf-honeypot {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

.wr-cf-submit-wrap {
    margin-top: 20px;
}

.wr-cf-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wr-cf-submit-btn:hover {
    transform: translateY(-1px);
}

.wr-cf-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.wr-cf-btn-loader {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wr-cf-btn-loader svg {
    animation: wrCfSpin 0.8s linear infinite;
}

/* Button Animations */
.wr-cf-btn-pulse {
    animation: wrCfPulse 2s infinite;
}

.wr-cf-btn-bounce:hover {
    animation: wrCfBounce 0.6s;
}

.wr-cf-btn-shake:hover {
    animation: wrCfShake 0.5s;
}

.wr-cf-btn-glow {
    box-shadow: 0 0 0 0 rgba(0,123,255,0.4);
    animation: wrCfGlow 2s infinite;
}

/* Animations */
@keyframes wrCfFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes wrCfSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes wrCfPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes wrCfBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

@keyframes wrCfShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

@keyframes wrCfGlow {
    0% { box-shadow: 0 0 0 0 rgba(0,123,255,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0,123,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,123,255,0); }
}

/* Form hiding during submission */
.wr-cf-form.submitting {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Spinning wheel overlay */
.wr-cf-spinner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.55);
    border-radius: inherit;
    z-index: 10;
    animation: wrCfFadeIn 0.2s ease;
    pointer-events: none;
}

.wr-cf-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #b2f0c8;
    border-top-color: #34c768;
    border-radius: 50%;
    animation: wrCfSpinWheel 0.75s linear infinite;
}

.wr-cf-spinner-message {
    margin: 14px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: #34c768;
    letter-spacing: 0.02em;
    opacity: 0;
}

@keyframes wrCfSpinWheel {
    to { transform: rotate(360deg); }
}

/* Ensure the container is positioned so the overlay sits inside it */
.wr-cf-form-container {
    position: relative;
}

/* Responsive */
@media (max-width: 768px) {
    .wr-cf-field-half {
        width: 100%;
    }

    .wr-cf-title {
        font-size: 24px;
    }
}