/**
 * XNode SMTP Mailer - Public Form Styles
 */

.xnode-form-wrapper {
    max-width: 640px;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.xnode-form-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.xnode-form-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.xnode-form .xnode-form-group {
    margin-bottom: 18px;
}

.xnode-form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.xnode-required {
    color: #dc3545;
}

.xnode-form .xnode-input,
.xnode-form .xnode-textarea,
.xnode-form .xnode-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}

.xnode-form .xnode-input:focus,
.xnode-form .xnode-textarea:focus,
.xnode-form .xnode-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.xnode-form .xnode-input.xnode-has-error,
.xnode-form .xnode-textarea.xnode-has-error,
.xnode-form .xnode-select.xnode-has-error {
    border-color: #dc3545;
}

.xnode-form .xnode-textarea {
    resize: vertical;
    min-height: 100px;
}

.xnode-form .xnode-file {
    font-size: 14px;
}

/* Checkbox & Radio */
.xnode-checkbox-label,
.xnode-radio-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    cursor: pointer;
    margin-bottom: 6px !important;
}

.xnode-checkbox-label input,
.xnode-radio-label input {
    width: 16px;
    height: 16px;
    margin: 0;
}

/* Heading & Paragraph */
.xnode-form-heading h4 {
    margin: 8px 0 0;
    font-size: 17px;
    color: #1a1a1a;
}

.xnode-form-paragraph p {
    color: #555;
    font-size: 14px;
    margin: 0;
}

/* Submit Button */
.xnode-form-submit {
    margin-top: 24px;
}

.xnode-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.xnode-submit-btn:hover {
    background: #005a87;
}

.xnode-submit-btn:active {
    transform: scale(0.98);
}

.xnode-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.xnode-submit-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: xnode-spin 0.6s linear infinite;
}

@keyframes xnode-spin {
    to { transform: rotate(360deg); }
}

/* Error messages */
.xnode-field-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.xnode-form-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* Success message */
.xnode-form-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 15px;
}

/* General error alert */
.xnode-form-alert {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

/* CAPTCHA Styles */
.xnode-captcha-group {
    margin-top: 8px;
}

.xnode-captcha-math {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.xnode-captcha-question {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 700;
    background: #f0f0f1;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    letter-spacing: 2px;
    user-select: none;
    color: #1d2327;
}

.xnode-captcha-input {
    max-width: 120px !important;
    font-size: 16px !important;
    text-align: center;
}

/* Newsletter Styles */
.xnode-newsletter-wrapper {
    max-width: 480px;
    margin: 24px 0;
    padding: 24px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.xnode-newsletter-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.xnode-newsletter-desc {
    color: #666;
    margin-bottom: 16px;
    font-size: 14px;
}

.xnode-newsletter-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 15px;
}

.xnode-newsletter-form .xnode-form-group {
    margin-bottom: 14px;
}

.xnode-newsletter-btn {
    width: 100%;
    justify-content: center;
}
