/**
 * Max Fields - Frontend Styles
 *
 * Form grids, mobile media queries, hover effects
 *
 * @package MaxFields
 * @version 5.1.0 – cleaned & fixed 2026
 */

/* ==========================================================================
   Multi-Step Form
   ========================================================================== */

.maxfields-multi-step-form {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Progress Bar */
.form-progress {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #00a32a);
    border-radius: 3px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-steps .step {
    font-size: 14px;
    color: #6c757d;
    padding: 8px 16px;
    border-radius: 20px;
    background: #fff;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.progress-steps .step.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    transform: scale(1.05);
}

.progress-steps .step.completed {
    background: #00a32a;
    color: #fff;
    border-color: #00a32a;
}

.progress-steps .step:hover:not(.active):not(.completed) {
    border-color: #2271b1;
    color: #2271b1;
}

/* Form Steps */
.form-step {
    display: none;
    padding: 30px;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-step h3 {
    margin: 0 0 25px 0;
    color: #343a40;
    font-size: 24px;
    font-weight: 600;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
    font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Event/Booth Details */
.event-details,
.booth-details,
.company-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
}

.event-details h4,
.booth-details h4,
.company-details h4 {
    margin: 0 0 10px 0;
    color: #2271b1;
    font-size: 18px;
}

.event-details p,
.booth-details p,
.company-details p {
    margin: 0 0 10px 0;
    color: #6c757d;
}

.event-meta,
.booth-meta,
.company-meta div {
    margin-bottom: 5px;
    font-size: 14px;
}

.event-meta strong,
.booth-meta strong,
.company-meta strong {
    color: #495057;
    margin-right: 8px;
}

/* Services Section */
#services-container {
    margin-bottom: 20px;
}

.service-item {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.service-item:hover {
    border-color: #2271b1;
    background: #fff;
}

.service-item.template {
    display: none;
}

.service-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.service-select {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
}

.service-select:focus {
    outline: none;
    border-color: #2271b1;
}

.remove-service {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-service:hover {
    background: #c82333;
    transform: scale(1.1);
}

.service-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    align-items: end;
}

.service-details > div {
    display: flex;
    flex-direction: column;
}

.service-details label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 5px;
}

.service-qty,
.service-price-input {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    text-align: right;
}

.service-qty:focus,
.service-price-input:focus {
    outline: none;
    border-color: #2271b1;
}

.service-total {
    text-align: center;
    padding: 15px;
    background: #e7f3ff;
    border-radius: 6px;
    border: 2px solid #b3d7ff;
}

.service-total-amount {
    font-size: 18px;
    font-weight: bold;
    color: #2271b1;
}

#add-service {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#add-service:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Review Section */
.review-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2271b1;
}

.review-section h4 {
    margin: 0 0 15px 0;
    color: #343a40;
    font-size: 18px;
    font-weight: 600;
}

.review-total {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #2271b1, #00a32a);
    color: #fff;
    border-radius: 8px;
    margin-top: 20px;
}

.review-total h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

#review-total-amount {
    font-size: 32px;
    font-weight: 900;
}

/* Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.prev-step,
.next-step,
.submit-form {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.prev-step {
    background: #6c757d;
    color: #fff;
}

.prev-step:hover {
    background: #5a6268;
}

.next-step {
    background: #2271b1;
    color: #fff;
}

.next-step:hover {
    background: #1e5b99;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.submit-form {
    background: #00a32a;
    color: #fff;
}

.submit-form:hover {
    background: #008a25;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 163, 42, 0.3);
}

.submit-form:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================================================
   Modal Styles
   ========================================================================== */

.maxfields-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: none;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.maxfields-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.maxfields-modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.maxfields-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #343a40;
}

.maxfields-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.maxfields-modal-close:hover {
    background: #f8f9fa;
    color: #343a40;
}

.maxfields-modal-body {
    padding: 30px;
}

.maxfields-modal-footer {
    padding: 25px 30px;
    border-top: 1px solid #e9ecef;
    text-align: right;
    background: #f8f9fa;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.maxfields-loading {
    position: relative;
    pointer-events: none;
}

.maxfields-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.maxfields-error {
    border-color: #dc3545 !important;
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

.maxfields-success {
    border-color: #28a745 !important;
    background-color: #d4edda !important;
    color: #155724 !important;
}

.maxfields-hidden {
    display: none !important;
}

/* ==========================================================================
   Responsive Design – General
   ========================================================================== */

@media screen and (max-width: 768px) {
    .maxfields-multi-step-form {
        margin: 10px;
        border-radius: 0;
        box-shadow: none;
    }

    .form-step {
        padding: 20px;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 8px;
    }

    .progress-steps .step {
        font-size: 12px;
        padding: 6px 12px;
        flex: 1;
        text-align: center;
    }

    .form-step h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .service-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .service-select {
        margin-bottom: 10px;
    }

    .remove-service {
        align-self: flex-end;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .form-navigation {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .prev-step,
    .next-step,
    .submit-form {
        width: 100%;
        padding: 15px;
        font-size: 18px;
    }

    .maxfields-modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .maxfields-modal-header,
    .maxfields-modal-body,
    .maxfields-modal-footer {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    .maxfields-multi-step-form {
        margin: 0;
    }

    .form-step {
        padding: 15px;
    }

    .form-step h3 {
        font-size: 18px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .service-item {
        padding: 15px;
    }

    .progress-steps .step {
        font-size: 11px;
        padding: 4px 8px;
    }
}

/* ==========================================================================
   Grid Layouts for Items
   ========================================================================== */

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.item-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-card:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.item-card.selected {
    border-color: #00a32a;
    box-shadow: 0 0 0 3px rgba(0, 163, 42, 0.2);
}

.item-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-card:hover .item-image img {
    transform: scale(1.05);
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover .item-overlay {
    opacity: 1;
}

.view-details-btn {
    background: #fff;
    color: #2271b1;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.view-details-btn:hover {
    background: #2271b1;
    color: #fff;
    text-decoration: none;
}

.item-info {
    padding: 20px;
}

.item-info h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
}

.item-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.meta-item {
    font-size: 14px;
    color: #6c757d;
}

.meta-item.price {
    font-weight: 600;
    color: #2271b1;
    font-size: 16px;
}

.item-actions {
    text-align: center;
}

.select-booth-btn,
.add-service-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-booth-btn {
    background: #2271b1;
    color: #fff;
}

.select-booth-btn:hover {
    background: #1e5b99;
    transform: translateY(-1px);
}

.add-service-btn {
    background: #28a745;
    color: #fff;
}

.add-service-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.loading-message,
.no-items {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

.no-items {
    grid-column: 1 / -1;
}

/* ==========================================================================
   Services Grid Layout
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.service-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.service-card:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.service-image {
    height: 180px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-content {
    padding: 20px;
}

.service-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
}

.service-description {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.service-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.service-price {
    font-size: 18px;
    font-weight: 700;
    color: #2271b1;
}

.service-dimensions {
    font-size: 14px;
    color: #6c757d;
}

.service-taxonomy {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
}

/* ==========================================================================
   Mobile Responsive Grids
   ========================================================================== */

@media screen and (max-width: 768px) {
    .items-grid,
    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .item-card,
    .service-card {
        margin: 0;
    }

    .item-info,
    .service-content {
        padding: 15px;
    }

    .item-image,
    .service-image {
        height: 150px;
    }
}

@media screen and (max-width: 480px) {
    .items-grid,
    .services-grid {
        gap: 10px;
    }

    .item-info h4,
    .service-content h4 {
        font-size: 16px;
    }

    .item-meta {
        flex-direction: column;
        gap: 4px;
    }

    .meta-item {
        font-size: 13px;
    }

    .select-booth-btn,
    .add-service-btn,
    .view-details-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* ==========================================================================
   Selected Services List
   ========================================================================== */

.selected-service-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.service-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.service-info strong {
    font-size: 16px;
    color: #343a40;
    flex: 1;
}

.service-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #495057;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.qty-btn.plus:hover {
    background: #28a745;
    color: #fff;
    border-color: #28a745;
}

.qty-btn.minus:hover {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.service-qty-input {
    width: 60px;
    text-align: center;
    padding: 5px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.service-price-display {
    font-weight: 600;
    color: #2271b1;
    min-width: 60px;
    text-align: right;
}

.remove-service-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-service-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .maxfields-multi-step-form {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .form-progress,
    .form-navigation {
        display: none;
    }

    .form-step {
        display: block !important;
    }

    .maxfields-modal {
        display: none !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .progress-fill,
    .step,
    .prev-step,
    .next-step,
    .submit-form,
    .maxfields-modal,
    .maxfields-modal-content,
    .maxfields-loading::after {
        animation: none;
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.prev-step:focus,
.next-step:focus,
.submit-form:focus,
.maxfields-modal-close:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .maxfields-multi-step-form {
        border: 2px solid #000;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        border: 2px solid #000;
    }

    .progress-steps .step {
        border: 2px solid #000;
    }
}

/* ==========================================================================
   ╔══════════════════════════════════════════════════════════════╗
   ║                 CONTACT FORM 7 + SERVICE REPEATER            ║
   ║                  CLEAN CONSOLIDATED VERSION – 2026           ║
   ╚══════════════════════════════════════════════════════════════╝
   ========================================================================== */

/* Universal fixes */
.wpcf7 form.wpcf7-form label + br {
    display: none !important;
}

.wpcf7 form.wpcf7-form *,
.wpcf7 form.wpcf7-form *::before,
.wpcf7 form.wpcf7-form *::after {
    box-sizing: border-box !important;
}

/* Prevent mobile zoom – 16px is the standard safe value */
.wpcf7 form.wpcf7-form input,
.wpcf7 form.wpcf7-form select,
.wpcf7 form.wpcf7-form textarea,
.cf7-service-item input,
.cf7-service-item select,
.cf7-service-item textarea,
.cf7-add-service-item,
.cf7-remove-service-item {
    font-size: 16px !important;
    line-height: 1.45 !important;
}

/* Form controls styling */
.wpcf7 form.wpcf7-form input,
.wpcf7 form.wpcf7-form select,
.wpcf7 form.wpcf7-form textarea,
.cf7-service-item select,
.cf7-service-item input[type="number"],
.cf7-service-item textarea {
    width: 100% !important;
    padding: 10px 12px !important;
    margin: 0 0 8px 0 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #ffffff !important;
}

/* Textareas */
.cf7-service-item textarea {
    min-height: 90px !important;
    height: 130px !important;
    resize: vertical !important;
}

/* Labels */
.cf7-service-item label,
.wpcf7 form.wpcf7-form label {
    display: block !important;
    margin: 0 0 6px 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

/* ── Service Repeater Item ── Desktop ── */
.cf7-service-item {
    display: grid !important;
    grid-template-columns: 120px 2fr 2fr 120px !important;
    gap: 16px !important;
    align-items: start !important;
    margin: 0 0 20px 0 !important;
    padding: 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
}

/* Image container – always square */
.cf7-service-image {
    width: 120px !important;
    height: 120px !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    background: #f9fafb !important;
    border: 1px dashed #d1d5db !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cf7-service-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

/* Buttons */
.cf7-add-service-item,
.cf7-remove-service-item {
    height: 38px !important;
    min-width: 80px !important;
    padding: 0 14px !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.cf7-add-service-item {
    background: #000000 !important;
    color: white !important;
}

.cf7-add-service-item:hover {
    background: #222222 !important;
}

.cf7-remove-service-item {
    background: #d63638 !important;
    color: white !important;
}

.cf7-remove-service-item:hover {
    background: #b32d2e !important;
}

/* ── Mobile layout ── */
@media screen and (max-width: 768px) {
    .cf7-service-item {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        grid-template-columns: none !important;
        align-items: stretch !important;
        padding: 14px !important;
    }

    .cf7-service-image {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto 10px auto !important;
    }

    .cf7-service-image img {
        width: 100% !important;
        height: 100% !important;
    }

    .cf7-service-item > div {
        width: 100% !important;
    }

    .cf7-service-item > div:last-child {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        align-items: center !important;
    }

    .cf7-service-item input[type="number"] {
        flex: 1 1 55% !important;
        text-align: center !important;
    }

    .cf7-add-service-item,
    .cf7-remove-service-item {
        flex: 1 1 40% !important;
        font-size: 14px !important;
    }
}

/* Tiny screens – slight reduction */
@media screen and (max-width: 480px) {
    .cf7-service-image {
        width: 110px !important;
        height: 110px !important;
    }

    .cf7-service-item {
        padding: 12px !important;
    }
}

/* Prevent reflow/zoom jump when adding rows */
.maxfields-cf7-service-repeater {
    min-height: 240px;
}