UNPKG

hotel-ai-widget

Version:

A customizable hotel chat widget for React and vanilla HTML

391 lines (330 loc) 6.57 kB
/* Hotel Images Section Styles */ .hotel-images-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; } .hotel-images-loading { flex: 1; display: flex; align-items: center; justify-content: center; } .hotel-images-loading-content { text-align: center; } .hotel-images-spinner { animation: spin 1s linear infinite; border-radius: 50%; height: 1.5rem; width: 1.5rem; border-top: 2px solid #3b82f6; margin: 0 auto 0.5rem; } .hotel-images-loading-text { font-size: 0.75rem; color: #6b7280; } .hotel-images-empty { flex: 1; display: flex; align-items: center; justify-content: center; } .hotel-images-empty-content { text-align: center; padding: 2rem 0; } .hotel-images-empty-icon { width: 2rem; height: 2rem; color: #d1d5db; margin: 0 auto 0.75rem; } .hotel-images-empty-title { color: #6b7280; font-size: 0.75rem; } .hotel-images-empty-subtitle { font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; } .hotel-images-header { background-color: white; padding: 0.5rem 0.75rem; border-bottom: 1px solid #d1d5db; flex-shrink: 0; } .hotel-images-header-content { display: flex; align-items: center; justify-content: space-between; } .hotel-images-header-info { display: flex; align-items: baseline; gap: 0.5rem; } .hotel-images-title { font-size: 0.875rem; font-weight: 700; } .hotel-images-count { font-size: 0.75rem; color: #6b7280; } .hotel-images-view-toggle { display: flex; align-items: center; gap: 0.25rem; background-color: #f3f4f6; border-radius: 0.5rem; padding: 0.125rem; } .hotel-images-view-button { padding: 0.25rem; border-radius: 0.375rem; transition: all 0.2s ease; border: none; cursor: pointer; background: transparent; } .hotel-images-view-button.active { background-color: white; color: #111827; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); } .hotel-images-view-button:not(.active) { color: #6b7280; } .hotel-images-view-button:not(.active):hover { color: #374151; } .hotel-images-view-icon { width: 0.75rem; height: 0.75rem; } .hotel-images-content { flex: 1; padding: 0.5rem 0.75rem; overflow-y: auto; } .hotel-images-category { margin-bottom: 1rem; } .hotel-images-category:last-child { margin-bottom: 0; } .hotel-images-category-button { display: flex; align-items: center; gap: 0.5rem; width: 100%; text-align: left; margin-bottom: 0.75rem; background: none; border: none; cursor: pointer; padding: 0; } .hotel-images-category-chevron { flex-shrink: 0; color: #6b7280; transition: transform 0.3s ease-in-out; width: 0.75rem; height: 0.75rem; } .hotel-images-category-chevron.expanded { transform: rotate(0deg); } .hotel-images-category-chevron.collapsed { transform: rotate(-90deg); } .hotel-images-category-info h2 { font-size: 0.75rem; font-weight: 600; text-transform: capitalize; transition: color 0.2s ease; } .hotel-images-category-button:hover h2 { color: #374151; } .hotel-images-category-count { font-size: 0.75rem; color: #6b7280; } .hotel-images-category-content { overflow: hidden; transition: all 0.3s ease-in-out; } .hotel-images-category-content.expanded { max-height: 1000px; opacity: 1; } .hotel-images-category-content.collapsed { max-height: 0; opacity: 0; } .hotel-images-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; } .hotel-images-grid-item { background-color: white; border: 1px solid #e5e7eb; border-radius: 0.5rem; overflow: hidden; transition: all 0.2s ease; } .hotel-images-grid-item:hover { border-color: #d1d5db; } .hotel-images-grid-image-container { aspect-ratio: 16 / 9; position: relative; overflow: hidden; } .hotel-images-grid-image { cursor: pointer; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; } .hotel-images-grid-item:hover .hotel-images-grid-image { transform: scale(1.05); } .hotel-images-grid-description { padding: 0.5rem; } .hotel-images-grid-description p { font-size: 0.75rem; color: #4b5563; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .hotel-images-list { display: flex; flex-direction: column; gap: 0.5rem; } .hotel-images-list-item { background-color: white; border: 1px solid #e5e7eb; border-radius: 0.5rem; padding: 0.5rem; transition: all 0.2s ease; } .hotel-images-list-item:hover { border-color: #d1d5db; } .hotel-images-list-content { display: flex; gap: 0.5rem; } .hotel-images-list-image-container { width: 3rem; height: 2.25rem; border-radius: 0.5rem; overflow: hidden; flex-shrink: 0; } .hotel-images-list-image { cursor: pointer; width: 100%; height: 100%; object-fit: cover; } .hotel-images-list-info { flex: 1; min-width: 0; } .hotel-images-list-title { font-weight: 500; color: #111827; margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.75rem; } .hotel-images-list-description { font-size: 0.75rem; color: #4b5563; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .hotel-images-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.7); z-index: 50; display: flex; align-items: center; justify-content: center; } .hotel-images-modal-content { position: relative; max-width: 56rem; width: 100%; padding: 1rem; } .hotel-images-modal-close { position: absolute; top: 1rem; right: 1rem; color: white; font-size: 1.25rem; background-color: rgba(0, 0, 0, 0.5); border-radius: 50%; padding: 0.5rem; border: none; cursor: pointer; transition: background-color 0.2s ease; padding-left: 0.75rem; padding-right: 0.75rem; padding-bottom: 0.25rem; } .hotel-images-modal-close:hover { background-color: black; } .hotel-images-modal-image { max-height: 80vh; width: 100%; object-fit: contain; border-radius: 0.5rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* Responsive Design */ @media (max-width: 768px) { .hotel-images-grid { grid-template-columns: 1fr; } .hotel-images-header { padding: 0.375rem 0.5rem; } .hotel-images-content { padding: 0.375rem 0.5rem; } .hotel-images-modal-content { padding: 0.5rem; } }