/* Real Estate Sellers Manager - Frontend Styles */

.resm-sellers-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.resm-branch-header,
.resm-featured-header {
    margin-bottom: 30px;
    text-align: center;
}

.resm-branch-header h3,
.resm-featured-header h3 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0;
    padding: 15px 0;
    border-bottom: 3px solid #e74c3c;
    display: inline-block;
}

/* Grid Layout */
.resm-sellers-grid {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

.resm-sellers-grid.resm-col-1 {
    grid-template-columns: 1fr;
}

.resm-sellers-grid.resm-col-2 {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

.resm-sellers-grid.resm-col-3 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.resm-sellers-grid.resm-col-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Seller Card */
.resm-seller-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%; /* Đảm bảo chiều cao đồng đều trong grid */
}

.resm-seller-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #e74c3c;
}

.resm-seller-card.featured {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.resm-seller-card.featured:hover {
    border-color: #e67e22;
}

/* Featured Badge */
.resm-featured-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    padding: 8px 15px;
    border-radius: 0 12px 0 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Seller Header */
.resm-seller-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.resm-seller-logo {
    flex-shrink: 0;
}

.resm-seller-logo img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.resm-no-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.resm-no-logo .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.resm-seller-info {
    flex: 1;
}

.resm-company-name {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.resm-seller-meta {
    font-size: 14px;
    color: #7f8c8d;
}

.resm-branch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ecf0f1;
    padding: 4px 10px;
    border-radius: 15px;
    color: #34495e;
}

.resm-branch .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Seller Body */
.resm-seller-body {
    margin-bottom: 20px;
}

.resm-address,
.resm-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
}

.resm-address .dashicons,
.resm-phone .dashicons {
    color: #e74c3c;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.resm-phone a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.resm-phone a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Working Areas */
.resm-working-areas {
    margin: 15px 0;
}

.resm-working-areas h5 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.resm-areas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.resm-area-tag {
    background: #e8f4fd;
    color: #2980b9;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #bee5eb;
}

.resm-area-more {
    background: #f8f9fa;
    color: #6c757d;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-style: italic;
    border: 1px solid #dee2e6;
}

/* Description */
.resm-description {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.resm-description p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* Footer & Buttons */
.resm-seller-footer {
    border-top: 1px solid #ecf0f1;
    padding-top: 15px;
}

.resm-contact-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.resm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.resm-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.resm-btn-email {
    background: #e74c3c;
    color: white;
}

.resm-btn-email:hover {
    background: #c0392b;
    color: white;
    transform: translateY(-2px);
}

.resm-btn-phone {
    background: #27ae60;
    color: white;
}

.resm-btn-phone:hover {
    background: #2ecc71;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.resm-btn-primary {
    background: #3498db;
    color: white;
}

.resm-btn-primary:hover {
    background: #2980b9;
}

.resm-btn-secondary {
    background: #95a5a6;
    color: white;
}

.resm-btn-secondary:hover {
    background: #7f8c8d;
}

/* Modal Styles */
.resm-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.resm-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #ecf0f1;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.resm-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
}

.resm-modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

.resm-modal-close:hover,
.resm-modal-close:focus {
    color: #e74c3c;
}

.resm-modal-body {
    padding: 25px;
}

/* Form Styles */
.resm-form-group {
    margin-bottom: 20px;
}

.resm-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.resm-form-group input,
.resm-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.resm-form-group input:focus,
.resm-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.resm-form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.resm-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f1;
}

/* No Sellers Message */
.resm-no-sellers {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.resm-no-sellers p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Responsive Design */

/* Desktop lớn: 1 hàng ngang (>1024px) - mặc định */

/* Tablet lớn: 2 hàng (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .resm-search-row {
        grid-template-columns: 1fr 1fr !important; /* Override desktop grid */
        grid-template-rows: auto auto !important;
        gap: 15px;
        width: 100%;
        justify-items: stretch;
    }
    
    .resm-search-input-group {
        grid-column: 1 / -1; /* Chiếm toàn bộ hàng đầu */
        width: 100%;
    }
    
    .resm-filter-group {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }
    
    .resm-action-group {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-end;
        width: 100%;
    }
    
    .resm-branch-filter {
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    
    .resm-search-input {
        width: 100%;
        box-sizing: border-box;
    }
    
    .resm-input-wrapper,
    .resm-select-wrapper {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Tablet nhỏ: 2 hàng (577px - 768px) */
@media (max-width: 768px) and (min-width: 577px) {
    .resm-search-row {
        grid-template-columns: 1fr 1fr !important; /* Override desktop grid */
        grid-template-rows: auto auto !important;
        gap: 15px;
        width: 100%;
        justify-items: stretch;
    }
    
    .resm-search-input-group {
        grid-column: 1 / -1; /* Chiếm toàn bộ hàng đầu */
        grid-row: 1;
        width: 100%;
    }
    
    .resm-filter-group {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }
    
    .resm-action-group {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-end;
        width: 100%;
    }
    
    .resm-branch-filter {
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    
    .resm-search-input {
        width: 100%;
        height: 46px;
        font-size: 15px;
        box-sizing: border-box;
    }
    
    .resm-branch-filter {
        height: 46px;
        font-size: 15px;
    }
    
    .resm-btn {
        height: 38px;
        font-size: 13px;
        padding: 0 14px;
    }
    
    .resm-input-wrapper,
    .resm-select-wrapper {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile: 3 hàng riêng biệt (≤576px) */
@media (max-width: 576px) {
    .resm-search-row {
        display: flex !important; /* Override grid với flexbox */
        flex-direction: column !important;
        gap: 15px;
        align-items: center;
        width: 100%;
        justify-content: center;
    }
    
    .resm-search-input-group {
        width: 100%;
        max-width: 100%;
        order: 1; /* Thứ tự 1: Search input */
    }
    
    .resm-filter-group {
        width: 100%;
        max-width: 100%;
        order: 2; /* Thứ tự 2: Branch filter */
    }
    
    .resm-action-group {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        order: 3; /* Thứ tự 3: Buttons */
    }
    
    .resm-branch-filter {
        width: 100%;
        min-width: 100%;
        box-sizing: border-box;
    }
    
    .resm-search-input {
        width: 100%;
        box-sizing: border-box;
        padding-left: 45px;
        padding-right: 15px;
        height: 44px;
        font-size: 15px;
    }
    
    .resm-branch-filter {
        height: 44px;
        font-size: 15px;
        padding-left: 45px;
        padding-right: 45px;
    }
    
    .resm-btn {
        height: 36px;
        font-size: 13px;
        padding: 0 12px;
        flex: 1; /* Buttons chia đều không gian */
        max-width: 120px; /* Giới hạn width tối đa */
    }
    
    .resm-btn-text {
        display: none; /* Ẩn text, chỉ hiển thị icon */
    }
    
    /* Đảm bảo container không bị overflow và center */
    .resm-search-container {
        overflow: hidden;
        width: 100%;
        margin: 0 auto;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .resm-search-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Đảm bảo input wrapper cũng full width */
    .resm-input-wrapper,
    .resm-select-wrapper {
        width: 100%;
        box-sizing: border-box;
    }
}

/* Optimized form elements - removed heavy animations */
.resm-search-input,
.resm-branch-filter,
.resm-btn {
    /* Removed transform3d and backface-visibility for better performance */
}

/* Focus states for accessibility */
.resm-search-input:focus,
.resm-branch-filter:focus,
.resm-btn:focus {
    outline: 2px solid rgba(255,255,255,0.8);
    outline-offset: 2px;
}

/* Loading state */
.resm-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.resm-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Updated Seller Card Styles */
.resm-seller-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex: 1; /* Chiếm toàn bộ không gian còn lại */
    flex-direction: column;
}

/* Header section với avatar và thông tin cơ bản */
.resm-seller-header-section {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

/* Body section với thông tin chi tiết */
.resm-seller-body-section {
    flex: 1;
    width: 100%;
    margin-bottom: 15px;
}

.resm-seller-avatar {
    flex-shrink: 0;
}

.resm-seller-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.resm-seller-details {
    min-width: 0;
}

.resm-seller-name {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.resm-company-name,
.resm-seller-branch,
.resm-company-address,
.resm-seller-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.resm-company-name .dashicons,
.resm-seller-branch .dashicons,
.resm-company-address .dashicons,
.resm-seller-phone .dashicons {
    color: #3498db;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.resm-seller-phone a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.resm-seller-phone a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.resm-seller-description {
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border-left: 4px solid #3498db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.resm-seller-description p {
    line-height: 1.6;
    color: #555;
    text-align: justify;
    
    /* Giới hạn hiển thị tối đa 3 dòng */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
    /* Fallback cho các trình duyệt cũ */
    max-height: calc(1.6em * 3); /* line-height * số dòng */
}

.resm-seller-description p:last-child {
    margin-bottom: 0;
}

.resm-seller-actions {
    margin-top: auto; /* Đẩy xuống dưới cùng */
    display: flex;
    gap: 10px;
}

/* Layout cho 2 nút - chia đều */
.resm-seller-actions.two-buttons {
    display: flex;
    gap: 10px;
}

.resm-seller-actions.two-buttons .resm-btn {
    flex: 1; /* Chia đều 50/50 */
    min-width: 0;
}

/* Layout cho 1 nút - full width */
.resm-seller-actions.single-button {
    display: flex;
}

.resm-seller-actions.single-button .resm-btn {
    width: 100%;
}

/* Đảm bảo buttons có height đồng đều */
.resm-seller-actions .resm-btn {
    min-height: 44px;
    padding: 8px 16px;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.resm-btn-phone,
.resm-btn-profile {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Override Bootstrap spacing for Dashicons */
.resm-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.resm-btn-phone {
    background: #27ae60;
    color: white;
}

.resm-btn-phone:hover {
    background: #2ecc71;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.resm-btn-profile {
    background: #6c757d;
    color: white;
}

.resm-btn-profile:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Load More Functionality */
.resm-load-more-container {
    text-align: center;
    margin: 40px 0;
}

.resm-load-more-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.resm-load-more-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.resm-load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.resm-load-more-loading .dashicons {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.resm-end-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Updated Modal Styles */
.resm-modal-close {
    background: none;
    border: none;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.resm-modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.resm-form-row {
    margin-bottom: 20px;
}

.resm-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
}

.resm-form-row .required {
    color: #e74c3c;
}

.resm-form-row input,
.resm-form-row textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.resm-form-row input:focus,
.resm-form-row textarea:focus {
    outline: 0;
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.resm-form-row textarea {
    resize: vertical;
    min-height: 100px;
}

.resm-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.resm-btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.resm-btn-primary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-1px);
}

.resm-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.resm-btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.resm-btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

/* Optimized animation for cards */
.resm-seller-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: opacity, transform;
}

.resm-seller-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Additional responsive styles for other components */
@media (max-width: 768px) {
    .resm-seller-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .resm-seller-header-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .resm-seller-avatar {
        align-self: center;
    }
    
    .resm-seller-description {
        text-align: left;
    }
    
    .resm-seller-description p {
        text-align: left;
        line-height: 1.6;
        
        /* Giới hạn hiển thị tối đa 3 dòng trên mobile */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        max-height: calc(1.6em * 3); /* line-height * số dòng */
    }
    
    /* Responsive cho buttons */
    .resm-seller-actions {

        width: 100%;
    }
    
    .resm-seller-actions.two-buttons {
        display: flex;
        gap: 12px;
        width: 100%;
    }
    
    .resm-seller-actions.two-buttons .resm-btn {
        flex: 1;
        min-width: 0;
        max-width: none;
    }
    
    .resm-seller-actions.single-button {
        display: flex;
        width: 100%;
    }
    
    .resm-seller-actions.single-button .resm-btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .resm-seller-actions .resm-btn {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-sizing: border-box;
    }
    
    .resm-form-actions {
        flex-direction: column-reverse;
    }
    
    .resm-btn-primary,
    .resm-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .resm-sellers-grid.resm-col-2,
    .resm-sellers-grid.resm-col-3,
    .resm-sellers-grid.resm-col-4 {
        grid-template-columns: 1fr;
    }
    
    .resm-modal-content {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    /* Điều chỉnh cho màn hình nhỏ */
    .resm-seller-actions.two-buttons {
        gap: 10px;
    }
    
    .resm-seller-actions.two-buttons .resm-btn {
        flex: 1;
        min-width: 0;
    }
    
    .resm-seller-actions.single-button .resm-btn {
        max-width: 280px;
    }
    
    .resm-seller-actions .resm-btn {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
}

/* Search Form Styles - Simplified without container background */
.resm-search-container {
    margin-bottom: 30px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.resm-search-wrapper {
    position: relative;
    z-index: 1;
}

.resm-search-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    align-items: center;
}

/* Search Input Group */
.resm-search-input-group {
    position: relative;
}

.resm-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.resm-search-input {
    width: 100%;
    height: 48px;
    padding: 0 20px 0 50px;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    background: #ffffff;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.resm-search-input:focus {
    outline: none;
    border-color: #4a90e2;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(74, 144, 226, 0.2);
}

.resm-search-input::placeholder {
    color: #888;
    font-weight: 400;
}

.resm-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a90e2;
    font-size: 18px;
    z-index: 3;
}

/* Filter Group */
.resm-filter-group {
    position: relative;
}

.resm-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.resm-branch-filter {
    height: 48px;
    padding: 0 50px 0 50px;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    background: #ffffff;
    font-size: 16px;
    font-weight: 400;
    color: #333;
    min-width: 180px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    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='%234a90e2' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
}

.resm-branch-filter:focus {
    outline: none;
    border-color: #4a90e2;
    background-color: #ffffff;
    box-shadow: 0 2px 12px rgba(74, 144, 226, 0.2);
}

.resm-filter-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a90e2;
    font-size: 18px;
    z-index: 3;
}

/* Action Group - Smaller buttons */
.resm-action-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.resm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.resm-btn-search {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.resm-btn-search:hover {
    background: linear-gradient(135deg, #357abd 0%, #2968a3 100%);
    box-shadow: 0 3px 12px rgba(74, 144, 226, 0.4);
}

.resm-btn-clear {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.resm-btn-clear:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    box-shadow: 0 3px 12px rgba(108, 117, 125, 0.4);
}

.resm-btn i {
    font-size: 14px;
}

/* Search Result Info - Moved outside form */
.resm-search-result-info {
    margin: 20px 0 30px 0;
    display: flex;
    justify-content: center;
}

.resm-result-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 25px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.resm-result-badge i {
    color: #4a90e2;
    font-size: 16px;
}

/* Optimized form elements - removed heavy animations */
.resm-search-input,
.resm-branch-filter,
.resm-btn {
    /* Removed transform3d and backface-visibility for better performance */
}

/* Focus states for accessibility */
.resm-search-input:focus,
.resm-branch-filter:focus,
.resm-btn:focus {
    outline: 2px solid rgba(74, 144, 226, 0.8);
    outline-offset: 2px;
}

/* Loading state */
.resm-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.resm-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 