/* Label Template Selector Styles */

.label-template-selector {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.selector-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.current-selection {
    font-size: 14px;
    color: #666;
}

.current-selection strong {
    color: #2e7d32;
}

.template-search {
    margin-bottom: 20px;
}

.template-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.template-search input:focus {
    outline: none;
    border-color: #2e7d32;
}

.template-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.template-grid::-webkit-scrollbar {
    width: 8px;
}

.template-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.template-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.template-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.template-category {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
}

.template-category h4 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.template-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.template-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.template-option:hover {
    border-color: #2e7d32;
    background: #f1f8f4;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.15);
}

.template-option.selected {
    border-color: #2e7d32;
    background: #e8f5e9;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}

.template-icon {
    font-size: 24px;
    min-width: 30px;
    text-align: center;
}

.template-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.template-name {
    font-size: 14px;
    color: #333;
    line-height: 1.2;
}

.template-size {
    font-size: 11px;
    color: #999;
}

.template-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.template-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.label-preview {
    background: white;
    border: 2px solid #333;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
}

.label-preview.square {
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.label-preview.large {
    width: 200px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.label-preview.address {
    width: 250px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.preview-row {
    margin: 2px 0;
    line-height: 1.2;
}

.template-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-primary {
    background: #2e7d32;
    color: white;
}

.btn-primary:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-secondary:hover {
    background: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(85, 85, 85, 0.3);
}

.btn-tertiary {
    background: #e0e0e0;
    color: #333;
}

.btn-tertiary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* Notification styles */
.template-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2e7d32;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 10000;
}

.template-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 768px) {
    .template-options {
        grid-template-columns: 1fr;
    }
    
    .template-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .selector-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .label-template-selector {
        background: #1e1e1e;
        color: #e0e0e0;
    }
    
    .selector-header {
        border-bottom-color: #333;
    }
    
    .selector-header h3 {
        color: #e0e0e0;
    }
    
    .current-selection {
        color: #999;
    }
    
    .template-search input {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .template-category {
        background: #2a2a2a;
    }
    
    .template-category h4 {
        color: #e0e0e0;
    }
    
    .template-option {
        background: #1e1e1e;
        border-color: #444;
    }
    
    .template-option:hover {
        background: #2e4e2e;
        border-color: #4a7c4a;
    }
    
    .template-option.selected {
        background: #2e4e2e;
        border-color: #4a7c4a;
    }
    
    .template-name {
        color: #e0e0e0;
    }
    
    .template-preview {
        background: #2a2a2a;
    }
    
    .template-preview h4 {
        color: #e0e0e0;
    }
    
    .label-preview {
        background: #333;
        border-color: #666;
        color: #e0e0e0;
    }
}
