/* Main Block Container */
.wp-block-broadplace-contact-form {
    max-width: 650px; /* Reduced from 700px */
    margin: 0 auto;
    border-radius: var(--border-radius-large); /* Keeping this variable as is */
}

/* Contact Form Block Styling */
.contact-form-block {
    background: transparent;
    padding: 1.2rem; /* Reduced from 1.5rem */
    border-radius: 8px; /* Reduced from 10px */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); /* Slightly softer and smaller shadow */
}

/* Form Title */
.form-title {
    margin: 0 0 0.3rem; /* Reduced from 0.4rem */
    font-size: 2.3rem; /* Reduced from 1.5rem */
    font-weight: 600;
    color: var(--wp--preset--color--text-primary, #333);
}

/* Form Description */
.form-description {
    margin: 0 0 1.2rem; /* Reduced from 1.5rem */
    color: var(--wp--preset--color--text-secondary, #666);
    line-height: 1.4; /* Reduced from 1.5 */
}

/* Form Layout */
.broadplace-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem; /* Reduced from 1rem */
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem; /* Reduced from 1rem */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem; /* Reduced from 0.4rem */
}

/* Form Controls */
label {
    font-weight: 600;
    color: var(--wp--preset--color--text-primary, #333);
    font-size: 0.75rem; /* Reduced from 0.8rem */
}

.required {
    color: #dc3545;
    font-weight: normal;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
select,
textarea {
    padding: 0.5rem 0.7rem; /* Reduced from 0.6rem 0.8rem */
    border: 1px solid var(--wp--preset--color--border-light, #e0e0e0);
    border-radius: 4px; /* Reduced from 5px */
    font-size: 0.85rem; /* Reduced from 0.9rem */
    font-family: inherit;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary, #e91e63);
    box-shadow: 0 0 0 1.5px rgba(233, 30, 99, 0.1); /* Reduced from 2px */
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
    color: #999;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='7' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center; /* Reduced from 0.8rem */
    padding-right: 1.8rem; /* Reduced from 2rem */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

textarea {
    resize: vertical;
    min-height: 90px; /* Reduced from 100px */
    line-height: 1.3; /* Reduced from 1.4 */
}

/* Button (Note: .btn-large is not used by the block, .submit-btn is) */
.btn-large {
    padding: 0.7rem 1.2rem; /* Reduced from 0.8rem 1.5rem */
    font-size: 0.95rem; /* Reduced from 1rem */
    font-weight: 600;
    width: 100%;
    margin-top: 0.5rem;
}

.submit-btn{
    border-radius: 6px; /* Reduced from 8px */
    color: white;
    background-color: var(--accent-color);
    padding: 0.5rem 1.2rem; /* Reduced from 0.6rem 1.5rem */
    font-size: 0.9rem; /* Reduced from 0.95rem */
    outline: none;
    border: none;
    max-width: 90px; /* Reduced from 100px */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: var(--wp--preset--color--primary, #e91e63);
    transform: translateY(-1px);
}
.submit-btn:active {
    transform: translateY(0);
}

/* Notices */
.form-notice {
    margin: 0;
    font-size: 0.75rem; /* Reduced from 0.8rem */
    color: var(--wp--preset--color--text-secondary, #666);
    line-height: 1.3; /* Reduced from 1.4 */
}

.form-notice a {
    color: var(--wp--preset--color--primary, #e91e63);
    text-decoration: underline;
}

/* Success/Error Messages */
.form-success,
.form-error {
    padding: 0.7rem; /* Reduced from 0.8rem */
    border-radius: 4px; /* Reduced from 5px */
    text-align: center;
    margin-top: 0.7rem; /* Reduced from 0.8rem */
    font-size: 0.85rem; /* Reduced from 0.9rem */
}

.form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* reCAPTCHA (no direct style changes, but spacing might be affected by reduced gaps) */
.g-recaptcha {
    margin-bottom: 0.7rem; /* Reduced from 0.8rem */
}

/* Loading State */
.broadplace-contact-form.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.broadplace-contact-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px; /* Reduced from 30px */
    height: 25px; /* Reduced from 30px */
    border: 2px solid #f3f3f3; /* Reduced from 3px */
    border-top: 2px solid var(--wp--preset--color--primary, #e91e63); /* Reduced from 3px */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Validation */
input:invalid,
select:invalid,
textarea:invalid {
    border-color: #dc3545;
}

input:invalid:focus,
select:invalid:focus,
textarea:invalid:focus {
    box-shadow: 0 0 0 1.5px rgba(220, 53, 69, 0.1); /* Reduced from 2px */
}

/* Mobile styles */
@media (max-width: 768px) {
    .contact-form-block {
        padding: 0.8rem; /* Reduced from 1rem */
    }
    
    .form-row {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 0.6rem; /* Reduced from 0.8rem */
    }
    
    .form-title {
        font-size: 1.8rem; /* Reduced from 1.3rem */
    }
    
    .submit-btn {
        padding: 0.4rem 0.8rem; /* Reduced from 0.5rem 1rem */
        font-size: 0.8rem; /* Reduced from 0.9rem */
        max-width: 80px; /* Reduced from 90px */
    }
}