/**
 * Frontend Styles für TWW Styleguide Plugin mit Label-Filter
 */

.tww-styleguide-frontend {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header */
.tww-styleguide-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 3px solid #f0f0f0;
}

.tww-styleguide-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.tww-styleguide-intro {
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filter Section */
.tww-filter-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 2px solid #e0e0e0;
}

.tww-filter-section h3 {
    font-size: 20px;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.tww-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tww-filter-btn {
    padding: 10px 20px;
    background: #fff;
    color: #333;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tww-filter-btn:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.tww-filter-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

/* Label Badges */
.tww-item-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.tww-label-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #2271b1;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    border-radius: 12px;
    text-transform: lowercase;
}

/* Navigation */
.tww-styleguide-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.tww-nav-link {
    padding: 12px 24px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tww-nav-link:hover {
    background: #2271b1;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

/* Sections */
.tww-sg-section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

.tww-sg-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2271b1;
}

.tww-sg-icon {
    font-size: 36px;
}

.tww-sg-content {
    margin-top: 30px;
}

/* Logo Grid */
.tww-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.tww-logo-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.tww-logo-item:hover {
    border-color: #2271b1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.tww-logo-preview {
    width: 100%;
    height: 200px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding: 20px;
}

.tww-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tww-logo-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Buttons */
.tww-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.tww-btn-primary {
    background: #2271b1;
    color: #fff;
}

.tww-btn-primary:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.tww-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.tww-btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.tww-icon {
    font-size: 16px;
}

/* Fonts List */
.tww-fonts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tww-font-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tww-font-item:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tww-font-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.tww-font-icon {
    font-size: 32px;
}

.tww-font-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tww-font-name {
    font-size: 16px;
    color: #1a1a1a;
}

.tww-font-type {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Destinations & Colors */
.tww-destination-block {
    margin-bottom: 50px;
    padding: 30px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
}

.tww-destination-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.tww-color-group {
    margin-bottom: 35px;
}

.tww-color-group-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.tww-color-palette {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.tww-color-swatch {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.tww-color-swatch:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tww-color-preview {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.tww-color-values {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tww-color-value {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tww-color-value strong {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tww-color-code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tww-color-code:hover {
    border-color: #2271b1;
    background: #f9f9f9;
}

.tww-copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.tww-copy-btn:hover {
    opacity: 1;
}

/* Wording Section */
.tww-wording-content {
    background: #fff;
    padding: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    line-height: 1.8;
    font-size: 16px;
}

.tww-wording-content h1,
.tww-wording-content h2,
.tww-wording-content h3,
.tww-wording-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.tww-wording-content p {
    margin-bottom: 15px;
    color: #333;
}

.tww-wording-content ul,
.tww-wording-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.tww-wording-content li {
    margin-bottom: 8px;
}

/* Image Grid */
.tww-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.tww-image-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.tww-image-item:hover {
    border-color: #2271b1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.tww-image-preview {
    width: 100%;
    height: 200px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.tww-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.tww-image-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Asset Grid */
.tww-asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.tww-asset-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.tww-asset-item:hover {
    border-color: #2271b1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.tww-asset-preview {
    width: 100%;
    height: 180px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.tww-asset-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.tww-asset-file {
    width: 100%;
    height: 180px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    padding: 20px;
    text-align: center;
}

.tww-file-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.tww-file-name {
    font-size: 14px;
    color: #666;
    word-break: break-word;
}

.tww-asset-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Footer */
.tww-styleguide-footer {
    text-align: center;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
    color: #666;
    font-size: 14px;
}

/* Filterable Items Animation */
.tww-filterable {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tww-styleguide-header h1 {
        font-size: 32px;
    }
    
    .tww-styleguide-intro {
        font-size: 16px;
    }
    
    .tww-filter-section {
        padding: 20px;
    }
    
    .tww-filter-buttons {
        gap: 8px;
    }
    
    .tww-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .tww-sg-title {
        font-size: 26px;
    }
    
    .tww-logo-grid,
    .tww-image-grid,
    .tww-asset-grid {
        grid-template-columns: 1fr;
    }
    
    .tww-color-palette {
        grid-template-columns: 1fr;
    }
    
    .tww-logo-actions,
    .tww-image-actions,
    .tww-asset-actions {
        flex-direction: column;
    }
    
    .tww-font-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .tww-destination-block {
        padding: 20px;
    }
    
    .tww-wording-content {
        padding: 25px;
    }
}