/**
 * Les Morley Contact Form Styles
 * Matching the exact form from lesmorley.com
 * Version: 1.0
 */

/* Error Messages */
.lmcf-error-messages {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.lmcf-error-messages strong {
    display: block;
    margin-bottom: 10px;
}

.lmcf-error-messages ul {
    margin: 0;
    padding-left: 20px;
}

.lmcf-error-messages li {
    margin-bottom: 5px;
}

/* Honeypot field - completely hidden from view and screen readers */
.lmcf-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Form Container */
.lmcf-contact-form {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
}

/* Form Headings (matching Contact Form 7 style) */
.lmcf-contact-form h5 {
    font-size: 16px;
    font-weight: 600;
    margin: 25px 0 15px 0;
    color: #333;
    line-height: 1.5;
}

.lmcf-contact-form h5:first-of-type {
    margin-top: 0;
}

/* Disclaimer Heading - Special Styling */
.lmcf-disclaimer-heading {
    font-size: 16px;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: #333;
    line-height: 1.6;
}

/* Form Groups */
.lmcf-form-group {
    margin-bottom: 15px;
}

.lmcf-form-group label {
    display: block;
    font-weight: 400;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.lmcf-form-group .required {
    color: #d9534f;
    font-weight: bold;
}

/* Form Controls */
.lmcf-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background-color: #fff;
}

.lmcf-form-control:focus {
    outline: none;
    border-color: #66afe9;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

/* Textarea specific */
textarea.lmcf-form-control {
    resize: vertical;
    min-height: 150px;
    line-height: 1.5;
}

/* Checkbox Group */
.lmcf-checkbox-group {
    margin-bottom: 20px;
}

.lmcf-checkbox-label {
    display: block;
    font-weight: normal;
    margin-bottom: 8px;
    cursor: pointer;
}

.lmcf-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

.lmcf-checkbox-label span {
    vertical-align: middle;
    font-size: 14px;
}

/* Radio Group */
.lmcf-radio-group {
    margin-bottom: 20px;
}

.lmcf-radio-label {
    display: inline-block;
    font-weight: normal;
    margin-right: 15px;
    cursor: pointer;
}

.lmcf-radio-label input[type="radio"] {
    margin-right: 8px;
    vertical-align: middle;
}

.lmcf-radio-label span {
    vertical-align: middle;
    font-size: 14px;
}

/* Submit Button (matching Contact Form 7 style) */
.lmcf-submit-btn {
    background-color: #0073aa;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: normal;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-transform: none;
}

.lmcf-submit-btn:hover {
    background-color: #005a87;
}

.lmcf-submit-btn:active {
    transform: translateY(1px);
}

.lmcf-submit-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Paragraph styling inside form */
.lmcf-contact-form p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lmcf-contact-form {
        padding: 0;
    }
    
    .lmcf-form-control {
        padding: 10px;
        font-size: 14px;
    }
    
    .lmcf-submit-btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    .lmcf-contact-form h5,
    .lmcf-disclaimer-heading {
        font-size: 15px;
    }
}

/* Accessibility improvements */
.lmcf-form-control:invalid {
    box-shadow: none;
}

.lmcf-form-control:required:invalid {
    border-color: #ccc;
}

.lmcf-form-control:required:valid {
    border-color: #ccc;
}

/* Loading state (optional - can be added via JS) */
.lmcf-contact-form.loading .lmcf-submit-btn {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.lmcf-contact-form.loading .lmcf-submit-btn:after {
    content: "...";
    animation: lmcf-dots 1.5s steps(4, end) infinite;
}

@keyframes lmcf-dots {
    0%, 20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60%, 100% {
        content: "...";
    }
}

/* Input focus states for better accessibility */
.lmcf-form-control:focus,
.lmcf-checkbox-label input[type="checkbox"]:focus + span,
.lmcf-radio-label input[type="radio"]:focus + span {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Match Contact Form 7 spacing */
.lmcf-contact-form .lmcf-form-group:last-of-type {
    margin-bottom: 0;
}
