/**
 * Style Page Styles for WowPlatter plugin
 *
 * @package    WowPlatter
 * @subpackage WowPlatter/public/css
 */

/* Style Page Styles */
.wowplatter-style-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Full Width Section Styles */
.wowplatter-full-width-section {
    margin-bottom: 30px;
}

.wowplatter-info-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wowplatter-info-box h2 {
    margin: 0 0 20px 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.wowplatter-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    max-height: 120px;
    overflow: hidden;
}

.wowplatter-info-box li {
    background: #f8f9ff;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.wowplatter-info-box li:hover {
    background: #667eea;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.wowplatter-info-box li:hover a {
    color: white;
}

.wowplatter-info-box a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.wowplatter-info-box a:hover {
    text-decoration: none;
}

/* Responsive adjustments for info boxes */
@media (max-width: 1200px) {
    .wowplatter-info-box ul {
        grid-template-columns: repeat(4, 1fr);
        max-height: 150px;
    }
}

@media (max-width: 900px) {
    .wowplatter-info-box ul {
        grid-template-columns: repeat(3, 1fr);
        max-height: 200px;
    }
}

/* Vinyl Table Styles */
.vinyl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.vinyl-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.vinyl-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.vinyl-table th:last-child {
    border-right: none;
}

.vinyl-table tbody tr {
    border-bottom: 1px solid #e1e5e9;
    transition: background-color 0.2s ease;
}

.vinyl-table tbody tr:hover {
    background-color: #f8f9ff;
}

.vinyl-table td {
    padding: 12px;
    vertical-align: top;
    font-size: 0.9em;
    line-height: 1.4;
}

.vinyl-table .thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vinyl-table .title-cell a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.vinyl-table .title-cell a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.vinyl-table .artist-cell .artist-link {
    color: #555;
    text-decoration: none;
}

.vinyl-table .artist-cell .artist-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.vinyl-table .price-cell {
    font-weight: 600;
    color: #2d5a27;
}

.vinyl-table .action-cell .view-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 600;
    transition: all 0.2s ease;
}

.vinyl-table .action-cell .view-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Text View Table Styles */
.vinyl-text-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 0.85em;
}

.vinyl-text-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.vinyl-text-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.vinyl-text-table th:last-child {
    border-right: none;
}

.vinyl-text-table th a {
    color: white;
    text-decoration: none;
}

.vinyl-text-table th a:hover {
    text-decoration: underline;
}

.vinyl-text-table tbody tr {
    border-bottom: 1px solid #e1e5e9;
    transition: background-color 0.2s ease;
}

.vinyl-text-table tbody tr:hover {
    background-color: #f8f9ff;
}

.vinyl-text-table td {
    padding: 8px;
    vertical-align: top;
    font-size: 0.8em;
    line-height: 1.3;
}

.vinyl-text-table td a {
    color: #667eea;
    text-decoration: none;
}

.vinyl-text-table td a:hover {
    color: #764ba2;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .wowplatter-info-box ul {
        grid-template-columns: repeat(2, 1fr);
        max-height: 300px;
    }
    
    .wowplatter-info-box li {
        font-size: 0.85em;
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .wowplatter-info-box ul {
        grid-template-columns: 1fr;
        max-height: none;
    }
}

.style-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.back-button {
    position: absolute;
    left: 20px;
    top: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    text-decoration: none;
    color: white;
}

.style-name {
    font-size: 3em;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.style-info {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.style-stats {
    color: #666;
    font-weight: 500;
}

.view-controls {
    display: flex;
    gap: 0;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.view-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    border-radius: 0;
    margin: 0;
}

.view-btn:first-child {
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
}

.view-btn:last-child {
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
}

.view-btn:not(:first-child) {
    border-left: none;
}

.view-btn:hover:not(.active) {
    background: #f8f9ff;
    transform: translateY(-1px);
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.per-page-selector select {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    font-size: 14px;
}

.results-info {
    color: #666;
    font-weight: 500;
}

/* View Container */
.results-container {
    position: relative;
}

/* View containers - controlled by JavaScript */
.view-cards {
    display: block;
}

.view-rows,
.view-text {
    display: none;
}

/* Compact Card View - Vinyl Grid */
.vinyl-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.vinyl-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vinyl-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.vinyl-cover {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.vinyl-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vinyl-card:hover .vinyl-cover img {
    transform: scale(1.05);
}

.price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.vinyl-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vinyl-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vinyl-artist {
    color: #667eea;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-size: 0.95rem;
}

.vinyl-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 10px 0;
    flex: 1;
}

.vinyl-meta {
    font-size: 0.8rem;
    color: #666;
}

.condition-badge {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.wantlist-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: auto;
    width: 100%;
}

.wantlist-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Row View Styles */
.view-rows {
    margin-top: 20px;
}

.row-item {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.row-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.row-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
}

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

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 24px;
}

.row-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.row-header {
    margin-bottom: 10px;
}

.row-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #333;
}

.row-title a {
    color: #333;
    text-decoration: none;
}

.row-title a:hover {
    color: #667eea;
}

.row-artist {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

.row-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    font-size: 0.85rem;
}

.row-detail {
    color: #666;
}

.row-detail strong {
    color: #333;
}

.inventory-comment {
    grid-column: 1 / -1;
    font-style: italic;
    color: #888;
}

.row-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    min-width: 120px;
}

.row-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

/* Text View Styles */
.view-text {
    margin: 20px 0;
    overflow-x: auto;
}

.text-view-container {
    min-width: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    overflow: hidden;
}

.vinyl-text-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95rem;
}

.vinyl-text-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.vinyl-text-table th a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s ease;
}

.vinyl-text-table th a:hover {
    opacity: 0.8;
}

.vinyl-text-table th .sort-arrow {
    font-size: 0.8rem;
    opacity: 0.7;
}

.vinyl-text-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    line-height: 1.4;
}

.vinyl-text-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.vinyl-text-table tr:hover {
    background-color: #e3f2fd;
    transition: background-color 0.2s ease;
}

.vinyl-text-table tr:last-child td {
    border-bottom: none;
}

.vinyl-text-table .price {
    font-weight: 600;
    color: #28a745;
}

.vinyl-text-table .artist-link,
.vinyl-text-table .genre-link,
.vinyl-text-table .style-link,
.vinyl-text-table .label-link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.vinyl-text-table .artist-link:hover,
.vinyl-text-table .genre-link:hover,
.vinyl-text-table .style-link:hover,
.vinyl-text-table .label-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.text-wantlist-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.text-wantlist-btn:hover {
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(238, 90, 36, 0.3);
}

.text-wantlist-btn i {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .vinyl-text-table {
        font-size: 0.85rem;
    }
    
    .vinyl-text-table th,
    .vinyl-text-table td {
        padding: 10px 8px;
    }
    
    .text-wantlist-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Legacy styles removed - now using vinyl-* classes */

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #f8f9ff;
    border-color: #667eea;
    transform: translateY(-1px);
}

.pagination .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.pagination .disabled {
    color: #ccc;
    border-color: #f0f0f0;
    cursor: not-allowed;
}

/* View Switching Styles */
.results-container .view-rows { display: none; }
.results-container .view-text { display: none; }
.results-container .view-wall { display: none; }

/* Cards Mode */
.results-container.mode-cards .view-cards { display: block; }
.results-container.mode-cards .view-rows { display: none; }
.results-container.mode-cards .view-text { display: none; }
.results-container.mode-cards .view-wall { display: none; }

/* Rows Mode */
.results-container.mode-rows .view-cards { display: none; }
.results-container.mode-rows .view-rows { display: block; }
.results-container.mode-rows .view-text { display: none; }
.results-container.mode-rows .view-wall { display: none; }

/* Text Mode */
.results-container.mode-text .view-cards { display: none; }
.results-container.mode-text .view-rows { display: none; }
.results-container.mode-text .view-text { display: block; }
.results-container.mode-text .view-wall { display: none; }

/* Wall Mode */
.results-container.mode-wall .view-cards { display: none; }
.results-container.mode-wall .view-rows { display: none; }
.results-container.mode-wall .view-text { display: none; }
.results-container.mode-wall .view-wall { display: block; }

/* Responsive Design */
@media (max-width: 1200px) {
    .vinyl-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .vinyl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .row-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .style-info {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-controls {
        justify-content: center;
    }
    
    .vinyl-grid {
        grid-template-columns: 1fr;
    }
    
    .back-button {
        position: static;
        margin-bottom: 20px;
        display: inline-block;
        text-align: center;
    }
    
    .style-name {
        font-size: 2em;
    }
    
    .row-item {
        flex-direction: column;
    }
    
    .row-image {
        width: 100%;
        height: 150px;
    }
    
    .row-actions {
        flex-direction: row;
        justify-content: space-between;
        min-width: auto;
    }
    
    .vinyl-text-table {
        font-size: 0.8rem;
    }
    
    .vinyl-text-table th,
    .vinyl-text-table td {
        padding: 8px 4px;
    }
}

/* Wall View Styles */
.view-wall {
    padding: 20px 0;
}

.wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 0;
}

.wall-item {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background: #fff;
    aspect-ratio: 1;
    position: relative;
}

.wall-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.wall-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wall-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #666;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.wall-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.7;
}

.wall-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* View Mode Controls */
.mode-cards .view-rows { display: none; }
.mode-cards .view-text { display: none; }
.mode-cards .view-wall { display: none; }
.mode-rows .view-cards { display: none; }
.mode-rows .view-text { display: none; }
.mode-rows .view-wall { display: none; }
.mode-text .view-cards { display: none; }
.mode-text .view-rows { display: none; }
.mode-text .view-wall { display: none; }
.mode-wall .view-cards { display: none; }
.mode-wall .view-rows { display: none; }
.mode-wall .view-text { display: none; }
.mode-wall .view-wall { display: block; }

@media (max-width: 768px) {
    .wall-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .wall-placeholder {
        padding: 15px;
    }
    
    .wall-placeholder i {
        font-size: 2rem;
    }
    
    .wall-title {
        font-size: 0.8rem;
    }
}

/* Top Section Grid Layouts */
.wowplatter-top-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.wowplatter-labels-grid,
.wowplatter-artists-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 10px;
    font-size: 0.9em;
}

.wowplatter-related-styles-section {
    margin-bottom: 30px;
}

.wowplatter-related-styles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    font-size: 0.9em;
}

.wowplatter-grid-full-span {
    grid-column: 1 / -1;
}

.wowplatter-grid-link {
    text-decoration: none;
    color: #333;
}

/* No Image Placeholder Styles */
.no-image-card {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #999;
    font-size: 48px;
}

.no-image-row {
    color: #999;
    font-size: 24px;
}