/* Contact Form 7 Styling to match Custom Form */
.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: left;
}

.wpcf7-form > p {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    width: 600px;
    max-width: 100%;
}

/* Labels */
.wpcf7-form label {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    line-height: 1.5;
    font-size: 16px;
    color: #86796a;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* School dropdown special styling */
.wpcf7-form p:first-of-type label {
    color: #1b1b1b;
}

/* Form Controls Container */
.wpcf7-form-control-wrap {
    position: relative;
    width: 100%;
}

/* Select Dropdown */
.wpcf7-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 48px;
    padding: 8px 48px 8px 24px;
    width: 100%;
    border-radius: 9999px;
    cursor: pointer;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    line-height: 1.4;
    color: #472663;
    font-size: 16px;
    border: none;
    outline: none;
    background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.8) 100%
        ),
        linear-gradient(90deg, rgb(174, 151, 201) 0%, rgb(174, 151, 201) 100%);
    text-align: center;
}

/* Add dropdown arrow after select */
.wpcf7-form-control-wrap:has(.wpcf7-select)::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 8 5" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L4 4L7 1" stroke="%2364358c" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
}

/* Fallback for browsers that don't support :has() */
.wpcf7-select + .dropdown-arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Text Inputs */
.wpcf7-text,
.wpcf7-email {
    background: #f9f5e7;
    border: 1px solid #e3dfd2;
    min-width: 240px;
    border-radius: 9999px;
    width: 100%;
    padding: 12px 16px;
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    line-height: 1.5;
    color: #1b1b1b;
    font-size: 16px;
    outline: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.wpcf7-text:focus,
.wpcf7-email:focus {
    background: #fefefd;
    border-color: #ae97c9;
}

/* Textarea */
.wpcf7-textarea {
    background: #f9f5e7;
    border: 1px solid #e3dfd2;
    height: 200px;
    min-width: 240px;
    border-radius: 16px;
    width: 100%;
    padding: 12px 16px;
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    line-height: 1.5;
    color: #1b1b1b;
    font-size: 16px;
    outline: none;
    resize: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.wpcf7-textarea:focus {
    background: #fefefd;
    border-color: #ae97c9;
}

/* Privacy Policy Text */
.wpcf7-form > p:nth-last-child(2) {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    line-height: 1.5;
    color: #5b5959;
    font-size: 16px;
    width: 590px;
    text-align: center;
    max-width: 100%;
}

/* Submit Button */
.wpcf7-submit {
    background: #64358c;
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 12px 24px;
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    line-height: 1.4;
    font-size: 16px;
    cursor: pointer;
    width: 600px;
    max-width: 100%;
    min-width: 64px;
    transition: background-color 0.3s ease;
    outline: none;
}

.wpcf7-submit:hover {
    background: #5a2d7a;
}

/* Submit button container */
.wpcf7-form > p:last-child {
    align-items: center;
    width: 600px;
}

/* Response output */
.wpcf7-response-output {
    margin-top: 20px;
    padding: 10px;
    border-radius: 8px;
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
}

.wpcf7-validation-errors {
    background: #fee;
    border: 1px solid #fcc;
    color: #c66;
}

.wpcf7-mail-sent-ok {
    background: #efe;
    border: 1px solid #cfc;
    color: #6c6;
}

/* Remove default margins and line breaks */
.wpcf7-form br {
    display: none;
}

.wpcf7-form p {
    margin: 0 !important;
}

.wpcf7-form p.by-filling {
    margin-bottom: 32px !important;
    color: #5b5959;
}

/* Hide spinner */
.wpcf7-spinner {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wpcf7-form > p {
        width: 100%;
    }

    .wpcf7-form > p:last-child,
    .wpcf7-form > p:nth-last-child(2) {
        width: 100%;
    }
}
