/* Metalosate Query Table Styles - Professional Document Style */

/* Search Box */
.metalosate-query-table-search {
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.metalosate-query-table-search label {
    font-weight: 600;
    color: #1e293b;
    margin-right: 8px;
    font-size: 14px;
}

.metalosate-query-table-search input[type="search"] {
    width: 350px;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2937;
}

.metalosate-query-table-search input[type="search"]:focus {
    outline: none;
    border-color: var(--wp--preset--color--theme-03);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    background-color: #ffffff;
    color: #1f2937;
}

/* Search Button Styling */
.metalosate-query-table-search button {
    background: var(--wp--preset--color--theme-03);
    color: #ffffff;
    border: 2px solid var(--wp--preset--color--theme-03);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.metalosate-query-table-search button:hover {
    background: var(--wp--preset--color--theme-02);
    border-color: var(--wp--preset--color--theme-02);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2);
}

.metalosate-query-table-search button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.metalosate-query-table-search button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

/* Clear Button - Subtle Text Link */
#metalosate-clear-search {
    background: none !important;
    border: none !important;
    color: #6b7280 !important;
    text-decoration: underline !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    box-shadow: none !important;
}

#metalosate-clear-search:hover {
    color: #374151 !important;
    background: none !important;
    border: none !important;
    transform: none !important;
    box-shadow: none !important;
    text-decoration: underline !important;
}

#metalosate-clear-search:focus {
    outline: none !important;
    color: var !important;
    text-decoration: underline !important;
    box-shadow: none !important;
}

#metalosate-clear-search:active {
    transform: none !important;
    box-shadow: none !important;
}

/* Table Wrapper */
.metalosate-query-table-wrapper {
    overflow-x: auto;
}

/* Prevent flash with smooth transitions */
.metalosate-query-table {
    position: relative;
}

.metalosate-query-table tbody {
    transition: opacity 0.3s ease-in-out;
    min-height: 200px;
}

.metalosate-query-table.loading tbody {
    opacity: 0.3;
}

/* Smooth content updates */
.metalosate-query-table tbody.updating {
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
}

/* Table Header with Add Report Button */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-report-button {
    background: var(--wp--preset--color--theme-03);
    color: #ffffff;
    border: 2px solid var(--wp--preset--color--theme-03);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.add-report-button:hover {
    background: var(--wp--preset--color--theme-02);
    border-color: var(--wp--preset--color--theme-02);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2);
}

.add-report-button .button-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.import-reports-button, .add-farm-button {
    background: transparent;
    color: var(--wp--preset--color--theme-03);
    border: 2px solid var(--wp--preset--color--theme-03);
    border-radius: 50px; /* Pill shape */
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}

.import-reports-button:hover {
    background: var(--wp--preset--color--theme-03) ;
    color: var(--wp--preset--color--theme-01);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2);
}

.import-reports-button .button-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Modal Styles */
.metalosate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none !important; /* Break out of constrained layout */
}

.modal-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: 0 auto;
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-body {
    padding: 30px;
}

/* Import modal specific styles */
.mq-import-progress {
    margin-top: 24px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #f6f7f7;
    max-height: 280px;
    overflow-y: auto;
}

.mq-import-progress-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mq-import-step {
    padding: 12px 16px;
    border-bottom: 1px solid #dcdcde;
    font-size: 13px;
    line-height: 1.4;
    color: #1f2937;
}

.mq-import-step:last-child {
    border-bottom: none;
}

.mq-import-step.status-success {
    background: #d1e7dd;
    color: #0a3622;
}

.mq-import-step.status-warning {
    background: #fff3cd;
    color: #664d03;
}

.mq-import-step.status-error {
    background: #f8d7da;
    color: #58151c;
}

.mq-import-step.status-pending {
    background: #f6f7f7;
    color: #414b57;
}

.mq-import-message {
    margin-top: 24px;
}

.mq-import-message .notice {
    margin: 0;
}

.mq-import-validation-list {
    margin: 12px 0 0 20px;
    padding: 0;
}

.mq-import-validation-list li {
    list-style: disc;
    margin-bottom: 4px;
    color: #1f2937;
}

/* Form Styles in Modal */
.balchem-tissue-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Form Sections */
.form-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 25px;
    background: #f9fafb;
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid var(--wp--preset--color--theme-03);
    padding-bottom: 10px;
}

/* Nutrient Groups */
.nutrient-group {
    margin-bottom: 25px;
}

.nutrient-group h4 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 16px;
    font-weight: 600;
    background: #e5e7eb;
    padding: 8px 12px;
    border-radius: 4px;
}

/* Add New Fields */
.add-new-field {
    margin-top: 10px;
    padding: 10px;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 4px;
}

.add-new-field input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--wp--preset--color--theme-03);
    border-radius: 4px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2937;
}

/* Lab Data Field Units - Proper input groups */
.lab-data-grid .form-group {
    position: relative;
}

.lab-data-grid .form-group input {
    padding-right: 45px;
}

.lab-data-grid .form-group::after {
    content: attr(data-unit);
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-left: 1px solid #d1d5db;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    padding: 9.75px 0;
}

/* Specific unit styling for different fields */
.lab-data-grid .form-group[data-unit="%"]::after {
    content: "%";
}

.lab-data-grid .form-group[data-unit="ppm"]::after {
    content: "ppm";
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

/* Specific spacing for location and sample sections */
.form-section .form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1f2937;
    transition: border-color 0.2s ease;
}

.form-group select option {
    background-color: #ffffff;
    color: #1f2937;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--theme-03);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    background-color: #ffffff;
    color: #1f2937;
}

.form-group select:disabled,
.form-group input:disabled,
.form-group textarea:disabled {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.searchable-select-input:disabled {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-group input[required] {
    border-left: 3px solid var(--wp--preset--color--theme-03);
}

.lab-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.submit-button {
    background: var(--wp--preset--color--theme-03);
    color: #ffffff;
    border: 2px solid var(--wp--preset--color--theme-03);
    border-radius: 50px;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-button:hover:not(:disabled) {
    background: var(--wp--preset--color--theme-02)  ;
    border-color: var(--wp--preset--color--theme-02);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.reset-button {
    background: none;
    color: #6b7280;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.reset-button:hover {
    color: #374151;
    text-decoration: none;
}

/* Success/Error Messages */
.notice {
    margin: 0 0 20px 0;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
}

.notice-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.notice-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Clickable Table Rows */
.clickable-row {
    transition: background-color 0.2s ease;
}

.clickable-row:hover {
    background-color: rgba(34, 197, 94, 0.08) !important;
}

.clickable-row:hover td {
    background-color: transparent !important;
}

/* Searchable Select Styles */
.searchable-select-wrapper {
    position: relative;
    width: 100%;
}

.searchable-select-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.searchable-select-input:focus {
    outline: none;
    border-color: var(--wp--preset--color--theme-03);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.searchable-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.searchable-select-options {
    padding: 4px 0;
}

.searchable-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    background-color: #ffffff;
    color: #374151;
    transition: background-color 0.2s ease;
}

.searchable-option:hover {
    background-color: #f3f4f6;
}

.searchable-option:active {
    background-color: #e5e7eb;
}

/* Ensure modal content is centered */
.metalosate-modal .modal-content {
    position: relative;
    margin: 0 auto;
    transform: none;
}

/* Override constrained layout for modal content */
.is-layout-constrained .metalosate-modal .modal-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 0 auto;
    max-width: 800px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-actions {
        justify-content: center;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .lab-data-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-button,
    .reset-button {
        width: 100%;
    }
}

/* Remove problematic display changes that break table layout */

/* Table Styles - Professional Document Style */
.metalosate-query-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.metalosate-query-table th {
    background: var(--wp--preset--color--theme-03);
    color: #ffffff;
    border: 1px solid var(--wp--preset--color--theme-03);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    cursor: pointer;
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metalosate-query-table th:hover {
    background: var(--wp--preset--color--theme-02);
}

.metalosate-query-table th.sortable {
    padding-right: 30px;
}

.metalosate-query-table th.sortable:hover {
    background: var(--wp--preset--color--theme-02);
}

.metalosate-query-table td {
    border: 1px solid #e5e7eb;
    padding: 12px 16px;
    vertical-align: top;
    color: #374151;
    font-size: 14px;
}

.metalosate-query-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.metalosate-query-table tbody tr:hover {
    background: #f0fdf4;
}

.metalosate-query-table tbody tr:nth-child(even):hover {
    background: #dcfce7;
}

/* Sort Indicators */
.sort-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.7;
}

.sort-indicator.asc {
    border-bottom: 4px solid #ffffff;
    opacity: 1;
}

.sort-indicator.desc {
    border-top: 4px solid #ffffff;
    opacity: 1;
}

/* Loading and Error States */
.loading-cell,
.error-cell,
.no-data-cell {
    text-align: center;
    padding: 20px;
    color: #646970;
    font-style: italic;
}

.loading-cell .spinner {
    float: none;
    margin: 0 5px 0 0;
}

.error-cell .dashicons {
    color: #d63638;
    margin-right: 5px;
}

.error-cell {
    text-align: left;
    padding: 30px;
    background: #fef7f7;
    border: 1px solid #f0b7b8;
    border-radius: 4px;
}

.error-message {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
    color: #d63638;
    font-weight: 600;
}

/* No Data Message Styling */
.no-data-cell {
    text-align: left;
    padding: 30px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.no-data-message {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
    color: #1d2327;
}

.no-data-cell .dashicons {
    color: #0073aa;
    font-size: 24px;
    margin-right: 10px;
    vertical-align: top;
}

.no-data-cell .dashicons-warning {
    color: #d63638;
}

.helpful-actions {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    text-align: left;
}

.helpful-actions p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #1d2327;
}

.helpful-actions ul {
    margin: 0;
    padding-left: 20px;
}

.helpful-actions li {
    margin-bottom: 5px;
    color: #646970;
}

/* Pagination - Professional Style */
.metalosate-query-table-pagination {
    padding: 20px 0;
    border-top: 2px solid var(--wp--preset--color--theme-03);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination-info {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-links .button {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    min-height: auto;
    background: transparent;
    color: var(--wp--preset--color--theme-03);
    border: 2px solid var(--wp--preset--color--theme-03);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    cursor: pointer;
}

.pagination-links .button:hover:not(:disabled) {
    background: var(--wp--preset--color--theme-03);
    color: #ffffff;
    transform: scale(1.05);
}

.pagination-links .button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #e5e7eb;
    border-color: #e5e7eb;
    color: #9ca3af;
}

/* Hide first and last buttons */
.pagination-links .button.first-page,
.pagination-links .button.last-page {
    display: none;
}

/* Style previous/next buttons with arrows */
.pagination-links .button.prev-page::before {
    content: '←';
    font-size: 18px;
    font-weight: bold;
}

.pagination-links .button.next-page::after {
    content: '→';
    font-size: 18px;
    font-weight: bold;
}

.paging-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 15px;
}

.paging-input .current-page {
    width: 60px;
    text-align: center;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #1f2937;
    border-radius: 4px;
}

/* Alignment Support */
.metalosate-query-table.alignleft {
    float: left;
    margin-right: 2em;
    margin-bottom: 1em;
}

.metalosate-query-table.alignright {
    float: right;
    margin-left: 2em;
    margin-bottom: 1em;
}

.metalosate-query-table.aligncenter {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.metalosate-query-table.alignwide {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.metalosate-query-table.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Clear floats */
.metalosate-query-table.alignleft::after,
.metalosate-query-table.alignright::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive Design */
@media (max-width: 768px) {
    .metalosate-query-table-search {
        flex-direction: column;
        align-items: stretch;
    }
    
    .metalosate-query-table-search input[type="search"] {
        width: 100%;
    }
    
    .metalosate-query-table-pagination {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .pagination-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .metalosate-query-table {
        font-size: 12px;
    }
    
    .metalosate-query-table th,
    .metalosate-query-table td {
        padding: 6px 8px;
    }
    
    /* Reset alignment on mobile */
    .metalosate-query-table.alignleft,
    .metalosate-query-table.alignright {
        float: none;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Block Editor Styles */
.metalosate-query-table-editor {
    padding: 20px;
    border: 1px dashed #c3c4c7;
    background: #f6f7f7;
    border-radius: 4px;
    text-align: center;
}

.metalosate-query-table-placeholder h3 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 18px;
}

.metalosate-query-table-placeholder p {
    margin: 0;
    color: #646970;
    font-size: 14px;
}

/* WordPress Admin Integration */
.wp-admin .metalosate-query-table-container {
    margin: 0;
    border: none;
    box-shadow: none;
}

.wp-admin .metalosate-query-table-search {
    background: #fff;
    border-bottom: 1px solid #c3c4c7;
}

.wp-admin .metalosate-query-table-pagination {
    background: #fff;
    border-top: 1px solid #c3c4c7;
}

/* Add Grower Form Styles */
.add-grower-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Farms Repeater Styles */
#farms-repeater,
#farms-repeater-modal {
    margin-top: 20px;
}

.farms-repeater-list,
.farms-repeater-list-modal {
    margin-bottom: 15px;
}

.farm-row,
.farm-row-modal {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.farm-row:hover,
.farm-row-modal:hover {
    border-color: var(--wp--preset--color--theme-03);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

.farm-row-fields {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.farm-row-fields .form-group {
    margin-bottom: 0;
}

.farm-row-fields label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
}

.farm-row-fields input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.farm-row-fields input[type="text"]:focus {
    outline: none;
    border-color: var(--wp--preset--color--theme-03);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.farm-status-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.farm-status-toggle input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.farm-status-toggle span {
    font-size: 14px;
    color: #374151;
}

#add-farm-row,
#add-farm-row-modal {
    margin-top: 10px;
}

.remove-farm-row,
.remove-farm-row-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
    font-weight: 300;
}

.remove-farm-row:hover,
.remove-farm-row-modal:hover {
    background: #fee2e2;
    color: #dc2626;
}

@media (max-width: 768px) {
    .farm-row-fields {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .farm-row-fields .form-group:last-child {
        margin-top: 10px;
    }
}
