/**
 * Panasonic Recipe Finder CSS
 * Sleek design with black, white and gray colors, no rounded corners
 */

/* Floating button */
#prf-floating-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #000;
  color: white;
  border: none;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 9990;
  transition: all 0.2s ease;
  font-size: 13px;
}

#prf-floating-button:hover {
  background-color: #333;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

#prf-floating-button span {
  font-weight: 500;
}

/* Modal */
#prf-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.prf-modal-content {
  background-color: white;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.prf-modal-header {
  padding: 12px 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #000;
}

.prf-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
}

.prf-close-button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prf-close-button:hover {
  color: #ccc;
}

.prf-modal-body {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
}

/* Container and Search Bar */
.prf-container {
  width: 100%;
  margin: 0 auto;
}

.prf-search-container {
  margin-bottom: 15px;
}

.prf-search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.prf-search-icon {
  position: absolute;
  left: 10px;
  color: #777;
}

#prf-search-input {
  width: 100%;
  padding: 10px 10px 10px 35px;
  border: 1px solid #ddd;
  background-color: white;
  font-size: 14px;
  color: #333;
}

#prf-search-input:focus {
  outline: none;
  border-color: #999;
}

/* Tabs */
.prf-tabs-container {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.prf-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.prf-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.prf-tab-item {
  padding: 10px 15px;
  background: none;
  border: none;
  color: #777;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.prf-tab-item:hover {
  color: #333;
}

.prf-tab-item.active {
  color: #000;
  font-weight: 500;
}

.prf-tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #000;
}

/* Recipe Grid */
.prf-recipes-container {
  position: relative;
  min-height: 100px;
  height: 400px; /* Set fixed height for recipe container */
  overflow-y: auto; /* Enable vertical scrolling */
}

/* Custom scrollbar styling */
.prf-recipes-container::-webkit-scrollbar {
  width: 8px;
}

.prf-recipes-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.prf-recipes-container::-webkit-scrollbar-thumb {
  background: #888;
}

.prf-recipes-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.prf-recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.prf-recipe-card {
  border: 1px solid #eee;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  background-color: white;
}

.prf-recipe-card:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.prf-recipe-thumbnail {
  position: relative;
  height: 150px;
  overflow: hidden;
  background-color: #f9f9f9;
}

.prf-recipe-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.prf-recipe-card:hover .prf-recipe-thumbnail img {
  transform: scale(1.05);
}

.prf-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, background-color 0.2s;
}

.prf-play-button:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.85);
}

.prf-recipe-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 3px 6px;
  font-size: 11px;
}

.prf-recipe-info {
  padding: 12px;
}

.prf-recipe-title {
  margin: 0 0 5px 0;
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.prf-recipe-category {
  margin: 0;
  font-size: 12px;
  color: #777;
}

/* Video Modal */
#prf-video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Increased z-index to be higher than main modal */
}

.prf-video-modal-content {
  background-color: white;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.prf-video-modal-header {
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #000;
  color: white;
}

.prf-video-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.prf-video-close-button {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prf-video-close-button:hover {
  color: #ccc;
}

.prf-video-modal-body {
  padding: 0;
  overflow: hidden;
}

.prf-video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
}

.prf-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Empty state */
.prf-empty-state {
  text-align: center;
  padding: 30px;
  color: #777;
  width: 100%;
}

.prf-empty-state svg {
  margin-bottom: 10px;
  color: #ccc;
}

.prf-empty-state p {
  margin: 0;
  font-size: 14px;
}

/* Loading state */
.prf-recipes-grid.loading {
  position: relative;
  min-height: 150px;
}

.prf-recipes-grid.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #555;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .prf-recipes-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .prf-recipe-thumbnail {
    height: 120px;
  }
}

/* Ensure no rounded corners anywhere */
#prf-floating-button,
.prf-modal-content,
.prf-video-modal-content,
#prf-search-input,
.prf-recipe-card,
.prf-play-button,
.prf-recipe-duration,
button,
input,
select,
textarea {
  border-radius: 0 !important;
}