/* =========================
   INPUT GROUP
========================= */
.cf7-input-group {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 15px;
    position: relative;
}

/* CF7 wrapper fix */
.cf7-input-group .wpcf7-form-control-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Input fields */
.cf7-input-group input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

/* =========================
   BUTTONS
========================= */
.cf7-btn {
    padding: 10px 15px;
    border: 1px solid #007bff;
    background: #007bff;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

.cf7-btn.verify {
    background: #28a745;
    border-color: #28a745;
}

.cf7-btn:hover {
    opacity: 0.9;
}

/* =========================
   VALIDATION / ERRORS
========================= */
.wpcf7-not-valid-tip {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 13px;
    color: #dc3545;
}

.wpcf7-not-valid input {
    border-color: #dc3545;
}

/* Remove extra CF7 spacing */
.cf7-input-group p {
    margin: 0;
    width: 100%;
}

/* =========================
   FULL SCREEN LOADER
========================= */
#cf7-global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Spinner */
.cf7-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #fff;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: cf7spin 0.8s linear infinite;
}

/* Animation */
@keyframes cf7spin {
    to {
        transform: rotate(360deg);
    }
}

/* Keep input + button aligned */
.cf7-input-group {
    display: flex;
    align-items: flex-start; /* important */
    gap: 0;
}

/* Make wrapper behave like block */
.cf7-input-group .wpcf7-form-control-wrap {
    flex: 1;
    position: relative;
}

/* Input styling */
.cf7-input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.wpcf7-not-valid-tip {
	font-size: 13px;
	margin-top: 0;
}

/* 🔥 KEY FIX: absolutely position error */
.cf7-input-group .wpcf7-not-valid-tip {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 4px;
    font-size: 13px;
    color: #dc3545;
}

/* Add spacing below group so error doesn't overlap next field */
.cf7-input-group {
    margin-bottom: 25px;
}