/* Form Container */
.wpcf7-form {
    max-width: 672px;
    margin: 0 auto;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-radius: 0.75rem;
    background-color: transparent;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Remove all paragraph margins by default */
.wpcf7-form > p,
.wpcf7-form > div {
    margin: 0;
}

/* Name - Row 1, Column 1 */
.wpcf7-form > div:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1;
}

/* Email - Row 1, Column 2 */
.wpcf7-form > div:nth-of-type(2) {
    grid-column: 2;
    grid-row: 1;
}

/* Phone - Row 2, Column 1 */
.wpcf7-form > div:nth-of-type(3) {
    grid-column: 1;
    grid-row: 2;
}

/* Country - Row 2, Column 2 */
.wpcf7-form > div:nth-of-type(4) {
    grid-column: 2;
    grid-row: 2;
}

/* Textarea (instructions) - Row 3, full width */
.wpcf7-form > div:nth-of-type(5) {
    grid-column: 1 / -1;
    grid-row: 3;
}

/* File upload section - Row 4, full width */
.wpcf7-form > div:nth-of-type(6) {
    grid-column: 1/-1;
    grid-row: 4;
}

/* Format section - Row 5, full width */
.wpcf7-form > .format-section {
    grid-column: 1 / -1;
    grid-row: 5;
}

/* Submit button - Row 6, full width */
.wpcf7-form > p:last-of-type {
    grid-column: 1 / -1;
    grid-row: 6;
}

/* Responsive - Stack on mobile */
/* Responsive - Stack on mobile */
@media (max-width: 767px) {
    .wpcf7-form {
        grid-template-columns: 1fr;
    }
    
    /* Reset all form rows to stack vertically */
    .wpcf7-form > div:nth-of-type(1),  /* Name */
    .wpcf7-form > div:nth-of-type(2),  /* Email */
    .wpcf7-form > div:nth-of-type(3),  /* Country */
    .wpcf7-form > div:nth-of-type(4),  /* Phone */
    .wpcf7-form > div:nth-of-type(5),  /* Instructions */
    .wpcf7-form > div:nth-of-type(6),  /* File upload */
    .wpcf7-form > .format-section {     /* Format section */
        grid-column: 1;
        grid-row: auto;
    }
    
    /* Submit button */
    .wpcf7-form > p:last-of-type {
        grid-column: 1;
        grid-row: auto;
    }
}
/* Input Fields, Select, Textarea */
.wpcf7-form .form-input,
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    background-color: #fff;
}

.wpcf7-form .form-input:focus,
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: rgb(163, 163, 163);
    box-shadow: 0 0 0 1px rgb(163, 163, 163);
}

.wpcf7-form textarea {
    resize: vertical;
    max-height: 120px;
}

/* Select Dropdown */
.wpcf7-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    color: #6b7280;
}

.wpcf7-form select:focus,
.wpcf7-form select:not([value=""]) {
    color: #000;
}

/* Placeholder styling */
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
    color: #9ca3af;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Format Section */
.format-section {
    padding: 1rem 1.75rem 0.5rem 1.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background-color: #fff;
}

.format-section h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.75rem 0;
}

.format-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .format-grid {
        grid-template-columns: 1fr;
    }
}

.format-column {
    display: block;
}

.format-title {
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Checkbox Layout */
.checkbox-grid-2 .wpcf7-list-item {
    display: inline-block;
    width: 48%;
    margin: 0 0 0.5rem 0 !important;
}

.checkbox-grid-1 .wpcf7-list-item {
    display: block;
    width: 100%;
    margin: 0 0 0.75rem 0 !important;
}

/* Remove default CF7 list styling */
.wpcf7-form .wpcf7-checkbox {
    display: block;
}

/* Checkboxes */
.wpcf7-form input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    margin-right: 0.25rem;
    accent-color: rgb(163, 163, 163);
    cursor: pointer;
    vertical-align: middle;
}

.wpcf7-form .wpcf7-list-item-label {
    font-size: 0.875rem;
    color: #374151;
    vertical-align: middle;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Submit Button */
.wpcf7-form .form-submit,
.wpcf7-form input[type="submit"] {
    width: 100%;
    padding: 0.5rem 1rem;
    background-color: #000;
    color: #fff;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.wpcf7-form .form-submit:hover,
.wpcf7-form input[type="submit"]:hover {
    background-color: #1f2937;
}

/* Validation Messages */
.wpcf7-not-valid-tip {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.wpcf7-response-output {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
    font-size: 0.875rem;
    grid-column: 1 / -1;
}

.wpcf7-validation-errors {
    border-color: #fca5a5;
    background-color: #fee2e2;
    color: #991b1b;
}

.wpcf7-mail-sent-ok {
    border-color: #86efac;
    background-color: #dcfce7;
    color: #166534;
}

/* Loading Spinner */
.wpcf7-form.submitting .wpcf7-spinner {
    display: inline-block;
    margin-left: 0.5rem;
}