/* Main styles for Art Auction Website */

/* Import all CSS components */
@import 'base.css';
@import 'layout.css';
@import 'components.css';
@import 'details.css';
@import 'responsive.css';

/* Autocomplete styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.autocomplete-results.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover, .autocomplete-item.selected {
    background-color: #f9f9f9;
}

.autocomplete-item.selected {
    background-color: #f0f0f0;
}

.autocomplete-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.autocomplete-item-info {
    display: flex;
    flex-direction: column;
}

.autocomplete-item-name {
    font-weight: 500;
    color: #333;
}

.autocomplete-item-bio {
    font-size: 0.85em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.search-content {
    display: flex;
    gap: 35px;
    margin-top: 30px;
}

.filters-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.results-area {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .search-content {
        flex-direction: column;
    }
    .filters-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    .artwork-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .artwork-grid {
        grid-template-columns: 1fr;
    }
}

.artwork-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(320px, 1fr)); /* Wider cards */
    gap: 24px;
    margin-bottom: 40px;
}

.artwork-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 480px; /* Ensure all cards are the same height */
    min-width: 0;
}

.artwork-card:hover {
    transform: translateY(-5px);
}

.artwork-image {
    position: relative;
    height: 270px; /* Taller image area */
    width: 100%;
    flex-shrink: 0;
}

.artwork-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.artwork-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.artwork-info h4, .artwork-info .dimensions {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.artwork-info .view-lot {
    margin-top: auto;
    align-self: stretch;
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 15px;
    /* Ensure button is always at the bottom with padding */
}

/* Auth Pages Styles */
.auth-container {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 40px 32px 32px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.auth-container h1 {
    margin-bottom: 24px;
    color: #4a90a0;
    font-size: 2rem;
    font-weight: 700;
}
.form-group {
    width: 100%;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.form-group label {
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: #fafbfc;
}
.form-input:focus {
    border-color: #4a90a0;
    outline: none;
    background: #fff;
}
.auth-btn {
    width: 100%;
    padding: 12px 0;
    background: #4a90a0;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}
.auth-btn:hover {
    background: #347585;
}
.auth-links {
    margin-top: 18px;
    text-align: center;
    width: 100%;
}
.auth-links a {
    color: #4a90a0;
    text-decoration: none;
    margin: 0 6px;
    font-weight: 500;
    transition: color 0.2s;
}
.auth-links a:hover {
    color: #347585;
    text-decoration: underline;
}
.error-message {
    color: #d9534f;
    background: #fbeaea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 12px;
    width: 100%;
    text-align: left;
    font-size: 0.98rem;
    display: none;
}
.success-message {
    color: #28a745;
    background: #eafbea;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 12px;
    width: 100%;
    text-align: left;
    font-size: 0.98rem;
    display: none;
}
.error-message:empty, .success-message:empty {
    display: none;
}
.error-message:not(:empty), .success-message:not(:empty) {
    display: block;
}
