/* Video section styling */
.video-reel-container {
    margin-bottom: 30px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.video-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(76, 175, 80, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.video-card:hover .play-button {
    background-color: rgba(76, 175, 80, 0.9);
}

.play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 4px;
}

.video-title {
    padding: 12px;
    font-weight: bold;
    color: #4CAF50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-videos-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
}

.add-video-prompt {
    margin-top: 20px;
    text-align: center;
}

.add-video-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-video-btn:hover {
    background-color: #388E3C;
}

/* Overall container styling */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.profile-section {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

/* Profile header styling */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    text-align: center;
}

.inactive_follow{
  color: #004688;
  font-family: "Helvetica";
  font-size: 10pt;
  background-color: #ffffff;
  border: 1px solid;
  border-color: #004688;
  border-radius: 3px;
  width: 85px;
  height: 30px;
  cursor: pointer;
  padding:10px;
  letter-spacing: 2px;
}
.inactive_follow:hover{
  border:1px solid lightblue;
  color:lightblue;
}
.active_follow{
  color: white;
  font-family: "Helvetica";
  font-size: 10pt;
  background-color: #388E3C;
  border: 1px solid;
  border-color: lightblue;
  border-radius: 3px;
  width: 85px;
  height: 30px;
  cursor: pointer;
  padding:10px;
  letter-spacing: 2px;
}

.profile-picture {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid #4CAF50;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.profile-header h2 {
    margin: 10px 0 5px;
    color: #4CAF50;
}

.username {
    color: #388E3C;
    margin: 0;
    font-size: 0.9em;
}

/* Reference intake section */
.reference-intake-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.reference-intake-section h3 {
    margin-bottom: 15px;
    color: #4CAF50;
    font-size: 1.3em;
}

.reference-intake-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.nutrient-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.nutrient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.nutrient-card.editable {
    border: 2px dashed #4CAF50;
    background-color: #f0f8f0;
}

.nutrient-card.editing {
    border: 2px solid #4CAF50;
    background-color: #fff;
}

.nutrient-name {
    font-weight: bold;
    margin-bottom: 6px;
    color: #4CAF50;
    font-size: 0.85em;
}

.nutrient-value {
    font-size: 0.95em;
    color: #4CAF50;
    line-height: 1.2;
}

.user-value {
    font-weight: bold;
}

.user-value.placeholder {
    color: #aaa;
    font-style: italic;
}

.user-value.has-value {
    color: #4CAF50;
    font-weight: bold;
}

.reference-value {
    display: block;
    font-size: 0.75em;
    color: #388E3C;
    margin-top: 3px;
    opacity: 0.8;
}

.nutrient-input {
    width: 60px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
    margin: 0 2px;
}

.save-btn, .cancel-btn {
    padding: 4px 8px;
    margin: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
}

.save-btn {
    background-color: #4CAF50;
    color: white;
}

.save-btn:hover {
    background-color: #388E3C;
}

.cancel-btn {
    background-color: #f44336;
    color: white;
}

.cancel-btn:hover {
    background-color: #d32f2f;
}

.edit-buttons {
    margin-top: 8px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .reference-intake-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Recipe sections styling */
.recipe-sections {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h3 {
    margin: 0;
    color: #4CAF50;
    font-size: 1.3em;
}

.view-all-link {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
    display: flex;          
    align-items: center;
    transition: color 0.2s;
}

.view-all-link:hover {
    color: #388E3C;
    text-decoration: underline;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.recipe-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.recipe-image {
    height: 150px;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.05);
}

.recipe-title, .recipe-title_profile {
    padding: 12px;
    font-weight: bold;
    color: #4CAF50;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Shared lists styling */
.shared-lists-section h3 {
    margin-bottom: 20px;
    color: #4CAF50;
    font-size: 1.3em;
}

.shared-list-group {
    margin-bottom: 25px;
}

.shared-list-group h4 {
    margin-bottom: 15px;
    color: #388E3C;
    font-size: 1.1em;
}

.shared-list-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
}

.shared-list-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.shared-list-entry:last-child {
    border-bottom: none;
}

.user-profile {
    display: flex;
    align-items: center;
}

.shared-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: #4CAF50;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.accept-share, .reject-share, .remove-share {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.accept-share {
    background-color: #4CAF50;
    color: white;
}

.accept-share:hover {
    background-color: #388E3C;
}

.reject-share, .remove-share {
    background-color: #f44336;
    color: white;
}

.reject-share:hover, .remove-share:hover {
    background-color: #d32f2f;
}

.remove-share {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
}

.icon {
    width: 18px;
    height: 18px;
}

/* Helper classes */
.no-content {
    color: #388E3C;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.error-message {
    color: #f44336;
    text-align: center;
    padding: 15px;
    background-color: #ffebee;
    border-radius: 4px;
}

.error-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.clickable {
    cursor: pointer;
}

/* Editable profile picture */
.profile-picture.editable {
    position: relative;
    cursor: pointer;
}

.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(76, 175, 80, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.profile-picture.editable:hover .edit-overlay {
    opacity: 1;
}

.edit-icon {
    color: white;
    font-size: 24px;
}

/* Loading and success states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.success-message {
    color: #4CAF50;
    font-size: 0.8em;
    margin-top: 4px;
    opacity: 0;
    transition: opacity 0.3s;
}

.success-message.show {
    opacity: 1;
}

/* Nutrition Modal Styles */
.nutrition-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.nutrition-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nutrition-modal-header {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nutrition-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.nutrition-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nutrition-modal-close:hover {
    opacity: 1;
}

.nutrition-modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-recipe-title {
    font-size: 1rem;
    font-weight: 600;
    color: #4CAF50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.ingredients-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ingredient-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    transition: background-color 0.2s;
}

.ingredient-item:hover {
    background: #e9ecef;
}

.ingredient-name {
    font-weight: 500;
    color: #4CAF50;
    flex: 1;
    margin-right: 10px;
}

.ingredient-nutrition {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.nutrition-amount {
    font-weight: 600;
    color: #4CAF50;
    font-size: 1rem;
}

.ingredient-amount {
    font-size: 0.85rem;
    color: #388E3C;
}

.no-contributors {
    text-align: center;
    color: #388E3C;
    font-style: italic;
    padding: 20px;
}

/* Make nutrient cards clickable */
.nutrient-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nutrient-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nutrient-card.has-value {
    border-left: 4px solid #4CAF50;
}

/* Responsive title adjustments */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-header .view-all-link {
        margin-top: 5px;
    }
    
    .profile-container {
        padding: 10px;
    }
    
    .profile-section {
        padding: 20px;
    }
    
    .recipe-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .reference-intake-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .nutrient-card {
        padding: 8px;
    }
    
    .nutrient-name {
        font-size: 0.8em;
    }
    
    .nutrient-value {
        font-size: 0.85em;
    }
}

/* Animation for nutrient updates */
@keyframes nutrientUpdate {
    0% { background-color: #e8f5e8; }
    100% { background-color: #f9f9f9; }
}

.nutrient-card.updated {
    animation: nutrientUpdate 1s ease-out;
}

/* Tooltip styling */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #4CAF50;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8em;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Progress bars for nutrients */
.nutrient-progress {
    width: 100%;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.nutrient-progress-bar {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nutrient-progress-bar.over-limit {
    background-color: #f44336;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .profile-section {
        background-color: #fff;
        color: #4CAF50;
    }
    
    .nutrient-card {
        background-color: #f9f9f9;
        color: #4CAF50;
    }
    
    .recipe-card {
        background-color: #fff;
    }
    
    .video-card {
        background-color: #fff;
    }
    
    .no-videos-container {
        background-color: #f9f9f9;
    }
}


/* Print styles */
@media print {
    .edit-overlay,
    .view-all-link,
    .add-video-btn,
    .edit-buttons {
        display: none !important;
    }
    
    .profile-container {
        max-width: none;
        padding: 0;
    }
    
    .profile-section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Responsive modal */
@media (max-width: 768px) {
    .nutrition-modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }
    
    .nutrition-modal-header {
        padding: 15px;
    }
    
    .nutrition-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .nutrition-modal-body {
        padding: 15px;
        max-height: 70vh;
    }
    
    .ingredient-item {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .ingredient-nutrition {
        align-items: flex-start;
        width: 100%;
    }
    
    .nutrition-amount {
        font-size: 0.95rem;
    }
}

/* Loading state for nutrient cards */
.nutrient-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.nutrient-card .user-value.placeholder {
    color: #ccc;
}

.nutrient-card .user-value.has-value {
    color: #4CAF50;
    font-weight: 600;
}

/* Smooth scrollbar for modal */
.nutrition-modal-body::-webkit-scrollbar {
    width: 6px;
}

.nutrition-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.nutrition-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.nutrition-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
.nutrition-modal-header {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

