/* Targeting Contact Form 7 input wrappers */
/* Custom styling for Contact Form 7 submit button */
body .wpcf7-form-control.wpcf7-submit.has-spinner {
    background-color: transparent !important;
    color: #a40e26 !important; /* Text color matching the link example */
    border: 2px solid #0073e6 !important; /* Border color matching the link */
    border-radius: 3px !important; /* Rounded corners */
    font-size: 1rem !important; /* Font size */
    font-weight: bold !important; /* Bold text */
    padding: 10px 20px !important; /* Padding for spacing */
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    margin-top: 1rem !important; /* Space above the button */
    display: inline-block !important; /* Ensure it's block-level */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
    -webkit-appearance: none !important; /* Ensure the button looks consistent across browsers */
    appearance: none !important; /* Remove default button styles */
}

/* Hover state for the submit button */
body .wpcf7-form-control.wpcf7-submit.has-spinner:hover {
    background-color: ##ffebe9 !important; /* Change background on hover */
    color: white !important; /* Change text color on hover */
    border-color: #a40e26 !important; /* Darker border on hover */
}

/* Focus state for the submit button */
body .wpcf7-form-control.wpcf7-submit.has-spinner:focus {
    outline: none !important; /* Remove outline */
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.5) !important; /* Add focus ring */
    -webkit-box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.5) !important; /* Safari & older browsers */
    -moz-box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.5) !important; /* Firefox */
}

/* Custom styling for labels inside <p> elements */
body .wpcf7 p label {
    font-size: 1rem !important; /* Match font size of the example */
    font-weight: normal !important; /* Normal weight */
    color: #666 !important; /* Subtle gray color */
    line-height: 1.5 !important; /* Ensure readability with line height */
    margin-bottom: 0.5rem !important; /* Space below the label */
    display: block !important; /* Ensure label takes full width */
    padding-top: 0.5rem !important; /* Padding above the label */
}

/* Optional: Smaller font for description-like labels */
body .wpcf7 p label.description {
    font-size: 0.875rem !important; /* Smaller font for descriptions */
    color: #999 !important; /* Lighter color for descriptions */
    margin-top: 0.25rem !important; /* Space between label and description */
}

.wpcf7-form-control-wrap {
    position: relative;
    display: block;
    margin-bottom: 1rem;
}

/* Styling the input fields */
.wpcf7 input[type="email"],
.wpcf7 input[type="text"],
.wpcf7 textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    background-color: var(--wp--preset--color--background);
    color: var(--wp--preset--color--foreground);
}

/* Positioning the label */
.wpcf7-form-control-wrap label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    pointer-events: none;
    transition: all 0.2s ease;
}

/* Moving label when input is focused or not empty */
.wpcf7 input:focus + label,
.wpcf7 input:not(:placeholder-shown) + label,
.wpcf7 textarea:focus + label,
.wpcf7 textarea:not(:placeholder-shown) + label {
    top: -1rem;
    left: 0.5rem;
    font-size: 0.75rem;
    color: var(--wp--custom--elements--button--color--background);
}

/* Input focus styling */
.wpcf7 input:focus,
.wpcf7 textarea:focus {
    border-color: var(--wp--custom--elements--button--focus--color--background);
    outline: none;
}

/* Custom styling for Contact Form 7 submit button */
.wpcf7 input[type="submit"] {
    background-color: transparent;
    color: #0073e6; /* Set the text color similar to the link in your example */
    border: 2px solid #0073e6; /* Set the border color to match the link */
    border-radius: 3px; /* Rounded corners similar to the example button */
    font-size: 1rem; /* Match the font size */
    font-weight: bold; /* Make text bold for emphasis */
    padding: 10px 20px; /* Adjust padding for better appearance */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    margin-top: 1rem; /* Add some margin at the top */
}

/* Custom styling for Contact Form 7 labels */
.wpcf7 label {
    font-size: 1rem; /* Match the font size of the example */
    font-weight: normal; /* Set the font weight to normal (similar to the example) */
    color: #666; /* Set the text color similar to the example's subtle gray */
    line-height: 1.5; /* Match line height for readability */
    margin-bottom: 0.5rem; /* Add spacing below labels */
    display: block; /* Ensure the label takes up the full width */
    padding-top: 0.5rem; /* Padding on top to match spacing */
}

/* Adjust the description text (if needed for longer labels) */
.wpcf7 label.description {
    font-size: 0.875rem; /* Smaller font for description-like labels */
    color: #999; /* Lighter color for description */
    margin-top: 0.25rem; /* Space between the label and description */
}
