/**
 * F2F Store Tools - Product Label Printing CSS
 * /css/product-labels.css
 */

/* ====================================
 * 1. Main Container and Headers
 * ==================================== */
.f2f-product-labels {
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.f2f-st-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(243, 130, 33, 0.2);
}

.f2f-st-section-icon {
    background-color: white;
    border: 2px solid #f38221;
    color: #f38221;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 20px;
}

.f2f-st-feature-icon {
    flex: 0 0 50px;
    height: 50px;
    width: 50px;
    background-color: white;
    border: 2px solid #f38221;
    color: #f38221;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 15px;
}

.f2f-st-feature-icon i {
    color: #f38221;
}

.f2f-st-section-title {
    color: #181743;
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.f2f-st-section-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
}

/* ====================================
 * 2. Search and Filter Controls
 * ==================================== */
.f2f-product-labels-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.f2f-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    width: 100%;
}

.f2f-control-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.f2f-category-control,
.f2f-search-control {
    flex: 1;
    min-width: 250px;
}

.f2f-search-input-wrapper {
    display: flex;
    gap: 10px;
}

.f2f-search-input-wrapper input {
    flex: 1;
}

.f2f-filters-row {
    justify-content: flex-start;
    gap: 30px;
}

.f2f-control-group label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.f2f-control-group select,
.f2f-control-group input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.f2f-checkbox-group {
    flex-direction: row;
    align-items: flex-end;
    gap: 5px;
    min-width: 150px;
}

.f2f-search-button {
    background-color: #f38221;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.f2f-search-button:hover {
    background-color: #e67012;
}

/* Toggle Switch Styling */
.f2f-toggle-switch {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.f2f-toggle-input {
    height: 0;
    width: 0;
    visibility: hidden;
    position: absolute;
}

.f2f-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    width: 50px;
    height: 25px;
    background: #ddd;
    border-radius: 25px;
    position: relative;
    transition: background-color 0.2s;
    margin-right: 10px;
}

.f2f-toggle-label .f2f-toggle-switch-btn {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    transition: 0.2s;
    background: #fff;
    box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29);
}

.f2f-toggle-input:checked + .f2f-toggle-label {
    background: #f38221;
}

.f2f-toggle-input:checked + .f2f-toggle-label .f2f-toggle-switch-btn {
    left: calc(100% - 2px);
    transform: translateX(-100%);
}

.f2f-toggle-text {
    font-weight: 500;
    color: #333;
}

/* ====================================
 * 3. Product List Header
 * ==================================== */
.f2f-product-labels-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.f2f-select-all-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.f2f-results-count {
    font-weight: 500;
    color: #181743;
}

/* ====================================
 * 4. Products Container
 * ==================================== */
.f2f-products-container {
    margin-bottom: 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 200px;
    position: relative;
    padding: 20px; /* Increased from 15px */
    margin-top: 20px;
    background-color: #fff; /* Add background color */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Add subtle shadow */
}

.f2f-loading,
.f2f-no-products {
    padding: 50px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.f2f-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px 0;
}

.f2f-product-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
}

.f2f-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.f2f-product-checkbox {
    padding: 10px;
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.f2f-product-checkbox-label {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid #f38221;
    border-radius: 3px;
    cursor: pointer;
}

.product-checkbox:checked + .f2f-product-checkbox-label:after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f38221;
    font-size: 14px;
}

.f2f-product-image {
    padding: 10px;
    text-align: center;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.f2f-product-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.f2f-product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.f2f-product-name {
    font-size: 16px;
    margin: 0 0 10px 0;
    line-height: 1.3;
    color: #181743;
}

.f2f-product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.f2f-product-price {
    font-weight: 500;
    color: #f38221;
}

.f2f-product-stock {
    font-size: 14px;
    color: #666;
}

.f2f-product-sku {
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

/* ====================================
 * 5. Print Actions
 * ==================================== */
.f2f-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.f2f-print-button {
    flex: 1;
    min-width: 200px;
    background-color: #f38221;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.f2f-print-button:hover:not(:disabled) {
    background-color: #e67012;
}

.f2f-print-button:disabled {
    background-color: #f9c9a3;
    cursor: not-allowed;
}

/* ====================================
 * 6. DYMO Status
 * ==================================== */
.f2f-dymo-status {
    margin-top: 20px;
}

/* ====================================
 * 7. Responsive Styling
 * ==================================== */
@media (max-width: 768px) {
    .f2f-product-labels-controls {
        flex-direction: column;
    }
    
    .f2f-control-group {
        width: 100%;
    }
    
.f2f-products-list {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.f2f-products-list-header {
    display: table-header-group;
    background-color: #f5f5f5;
    font-weight: bold;
}

.f2f-products-list-header > div {
    display: table-cell;
    padding: 10px 15px;
    border-bottom: 2px solid #ddd;
    text-align: left;
}

.f2f-product-item {
    display: table-row;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.f2f-product-item:hover {
    background-color: #f9f9f9;
}

.f2f-product-item > div {
    display: table-cell;
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}
    
    .f2f-print-actions {
        flex-direction: column;
    }
    
    .f2f-product-item {
        flex-direction: row;
    }
    
    .f2f-product-image {
        width: 80px;
        height: 80px;
    }
}