/* Custom styles for Wine Cellar app */

/* Ensure full height for login page */
.min-vh-100 {
    min-height: 100vh;
}

/* Custom card styling */
.card {
    border: none;
    border-radius: 12px;
}

.card-body {
    padding: 2rem;
}

/* Input group styling */
.input-group-text {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color);
}

/* Button styling */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* Navigation styling */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Dashboard card hover effects */
.card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
}

/* Icon styling */
.fa-wine-bottle {
    color: var(--bs-primary);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 8px;
}

/* Tab styling */
.nav-pills .nav-link {
    border-radius: 8px;
    font-weight: 500;
}

.nav-pills .nav-link.active {
    background-color: var(--bs-primary);
}

/* Form validation styling */
.form-control:invalid {
    border-color: var(--bs-danger);
}

.form-control:valid {
    border-color: var(--bs-success);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .display-1 {
        font-size: 4rem;
    }
}

/* Custom spacing utilities */
.gap-2 > * {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Disabled button styling */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Stats card styling */
.card .fa-2x {
    opacity: 0.8;
}

/* Coming soon features styling */
.border {
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 8px;
}

.border:hover {
    background-color: var(--bs-secondary-bg);
    transition: background-color 0.2s ease-in-out;
}

/* Navigation Drawer Styles */
.navbar-toggler {
    border: none !important;
    padding: 0.25rem 0.5rem;
    background: none;
    color: var(--bs-light);
}

.navbar-toggler:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

.nav-drawer.active {
    visibility: visible;
    opacity: 1;
}

.nav-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.nav-drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background-color: var(--bs-dark);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.nav-drawer.active .nav-drawer-content {
    transform: translateX(0);
}

.nav-drawer-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bs-dark);
}

.nav-drawer-header h5 {
    color: var(--bs-light);
    margin: 0;
}

.nav-drawer-header .btn {
    color: var(--bs-light);
    padding: 0.25rem;
    font-size: 1.2rem;
}

.nav-drawer-header .btn:hover {
    color: var(--bs-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-drawer-body {
    padding: 1rem 0;
    flex: 1;
}

.nav-drawer-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--bs-light);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    border: none;
    font-weight: 500;
}

.nav-drawer-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-primary);
    text-decoration: none;
}

.nav-drawer-link:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-primary);
    outline: none;
}

.nav-drawer-link i {
    width: 20px;
    text-align: center;
}

/* Mobile responsiveness for navigation drawer */
@media (max-width: 576px) {
    .nav-drawer-content {
        width: 100%;
        max-width: 320px;
    }
}

/* Star Rating Styles */
.star-rating {
    font-size: 1.5rem;
    color: var(--bs-border-color);
    cursor: pointer;
    user-select: none;
}

.star-rating .fa-star {
    transition: color 0.2s ease;
    margin-right: 0.25rem;
}

.star-rating .fa-star:hover,
.star-rating .fa-star.hover {
    color: #ffc107;
}

.star-rating .fa-star.active {
    color: #ffc107;
}

/* Image Preview Styles */
.image-preview {
    position: relative;
    display: inline-block;
    margin: 0.25rem;
}

.image-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--bs-border-color);
}

.image-preview .remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: var(--bs-danger);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.image-preview .remove-image:hover {
    background-color: #dc3545;
}

/* Modal Improvements */
.modal-content {
    border: none;
    border-radius: 12px;
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
}

/* Form enhancements */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .modal-lg {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .star-rating {
        font-size: 1.25rem;
    }
    
    .image-preview img {
        width: 60px;
        height: 60px;
    }
}

/* Experience Tile Styles */
.experience-tile {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1rem;
}

.experience-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.experience-image-container {
    height: 140px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-secondary-bg);
    border-radius: 8px 0 0 8px;
}

.experience-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bs-primary-bg-subtle) 0%, var(--bs-secondary-bg) 100%);
    color: var(--bs-primary);
}

.wine-name {
    color: var(--bs-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.wine-details {
    font-size: 0.9rem;
    line-height: 1.4;
}

.wine-details span {
    display: inline-block;
    margin-bottom: 0.25rem;
}

.rating {
    font-size: 0.9rem;
}

.rating .fa-star {
    margin-right: 0.1rem;
}

.notes-heading {
    color: var(--bs-dark);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.notes-text {
    font-size: 0.9rem;
    line-height: 1.5;
    max-height: 3.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Responsive adjustments for experience tiles */
@media (max-width: 768px) {
    .experience-image-container {
        height: 100px;
    }
    
    .wine-details {
        font-size: 0.8rem;
    }
    
    .wine-details span {
        display: block;
        margin-bottom: 0.1rem;
    }
    
    .notes-text {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
        max-height: 2.4rem;
    }
}

@media (max-width: 576px) {
    .col-2 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .col-10 {
        flex: 0 0 75%;
        max-width: 75%;
    }
}

/* View Experience Modal Styles */
.wine-image-display {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--bs-secondary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wine-image-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bs-primary-bg-subtle) 0%, var(--bs-secondary-bg) 100%);
    color: var(--bs-primary);
}

.detail-row {
    line-height: 1.5;
    text-align: left;
}

.detail-row strong {
    color: var(--bs-dark);
}

.wine-info {
    text-align: left;
}

#viewRatingStars .fa-star {
    font-size: 1rem;
    margin-right: 0.1rem;
}

#viewRatingStars .fa-star.text-warning {
    color: #ffc107 !important;
}

#viewRatingStars .fa-star.text-muted {
    color: var(--bs-border-color) !important;
}

/* Hover effect for clickable tiles */
.experience-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Image navigation styles */
.image-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--bs-border-color);
}

.btn-nav-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
}

.wine-image-display {
    position: relative;
    cursor: pointer;
}

.wine-image-display:hover {
    opacity: 0.9;
}

/* Experience thumbnails */
.experience-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.experience-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--bs-border-color);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.experience-thumbnail:hover {
    transform: scale(1.05);
    border-color: var(--bs-primary);
}

/* Full screen image modal */
.fullscreen-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 2001;
}

.fullscreen-close:hover {
    color: var(--bs-primary);
}

/* Mobile responsive view modal */
@media (max-width: 768px) {
    .wine-image-display {
        height: 200px;
        margin-bottom: 1rem;
    }
    
    .detail-row strong {
        font-size: 0.9rem;
    }
    
    .experience-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .image-navigation {
        gap: 0.25rem;
    }
}
