/**
 * Frontend-Styles für FBM QR-Codes Premium
 * Cirkle Theme inspiriert
 */

/* Error Messages */
.fbm-qr-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Dashboard */
.fbm-qr-dashboard {
    margin: 20px auto;
    max-width: 1200px;
    width: 100%;
}

.fbm-qr-dashboard-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* Tabs */
.fbm-qr-tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.fbm-qr-tabs li {
    flex: 1;
    margin: 0;
}

.fbm-qr-tab {
    display: block;
    padding: 15px 20px;
    text-align: center;
    text-decoration: none;
    color: #6c757d;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.fbm-qr-tab:hover {
    background: #fff;
    color: #495057;
}

.fbm-qr-tab.is-active {
    background: #fff;
    color: #007bff;
    border-bottom-color: #007bff;
}

/* Tab Content */
.fbm-qr-tab-content {
    padding: 30px;
}

.fbm-qr-tab-panel {
    display: none;
}

.fbm-qr-tab-panel.is-active {
    display: block;
}

/* Unter-Tabs für Statistiken */
.fbm-qr-stats-subtabs {
    display: flex;
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    border-radius: 8px 8px 0 0;
    overflow-x: auto;
}

.fbm-qr-stats-subtabs li {
    margin: 0;
    white-space: nowrap;
}

.fbm-qr-subtab {
    display: block;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    color: #6c757d;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
}

.fbm-qr-subtab:hover {
    background: #fff;
    color: #495057;
}

.fbm-qr-subtab.is-active {
    background: #fff;
    color: #007bff;
    border-bottom-color: #007bff;
}

.fbm-qr-stats-subtab-content {
    padding: 0;
}

.fbm-qr-stats-subtab-panel {
    display: none;
}

.fbm-qr-stats-subtab-panel.is-active {
    display: block;
}

.fbm-qr-folder-charts-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.fbm-qr-folder-charts-row .fbm-qr-chart-container {
    flex: 1;
    min-width: 300px;
}

@media (max-width: 768px) {
    .fbm-qr-folder-charts-row {
        flex-direction: column;
    }
    
    .fbm-qr-folder-charts-row .fbm-qr-chart-container {
        min-width: 100%;
    }
}

/* Cards */
.fbm-qr-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.fbm-qr-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

.fbm-qr-subtitle {
    margin: 20px 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

/* Forms */
.fbm-qr-form {
    max-width: 100%;
}

.fbm-qr-form-group {
    margin-bottom: 20px;
}

.fbm-qr-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.fbm-qr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.fbm-qr-input,
.fbm-qr-select,
.fbm-qr-textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.fbm-qr-input:focus,
.fbm-qr-select:focus,
.fbm-qr-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.fbm-qr-textarea {
    resize: vertical;
    min-height: 100px;
}

.fbm-qr-color {
    width: 60px;
    height: 40px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
}

.fbm-qr-divider {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #e9ecef;
}

.fbm-qr-form-actions {
    margin-top: 30px;
    text-align: right;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
    color: #fff;
}

.btn-round {
    border-radius: 25px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
    color: #fff;
}

/* Type Fields */
.fbm-qr-type-fields {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Result */
.fbm-qr-result {
    margin-top: 30px;
    padding: 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
}

.fbm-qr-preview {
    text-align: center;
    margin: 20px 0;
}

.fbm-qr-preview img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fbm-qr-tracking-url {
    margin-top: 20px;
}

.fbm-qr-tracking-url label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.fbm-qr-tracking-url input {
    width: calc(100% - 100px);
    display: inline-block;
    margin-right: 10px;
}

/* Manager */
.fbm-qr-manager {
    margin-top: 20px;
}

.fbm-qr-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fbm-qr-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.fbm-qr-filter-group {
    display: flex;
    flex-direction: column;
}

.fbm-qr-filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
}

.fbm-qr-filter-actions {
    display: flex;
    gap: 10px;
}

.fbm-qr-list {
    margin-top: 20px;
}

.fbm-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.fbm-qr-item {
    display: flex;
    flex-direction: column;
}

.fbm-qr-item-preview {
    text-align: center;
    margin-bottom: 15px;
}

.fbm-qr-thumbnail {
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fbm-qr-item-info {
    flex: 1;
}

.fbm-qr-item-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.fbm-qr-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 12px;
}

.fbm-qr-meta-type,
.fbm-qr-meta-folder,
.fbm-qr-meta-category {
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 4px;
    color: #495057;
}

.fbm-qr-item-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    color: #6c757d;
}

.fbm-qr-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.fbm-qr-export-dropdown {
    position: relative;
}

.fbm-qr-export-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    min-width: 150px;
    margin-top: 5px;
}

.fbm-qr-export-link {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #495057;
    transition: background 0.3s ease;
}

.fbm-qr-export-link:hover {
    background: #f8f9fa;
}

/* Statistics */
.fbm-qr-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fbm-qr-stat-card {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fbm-qr-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 10px;
}

.fbm-qr-stat-label {
    font-size: 14px;
    color: #6c757d;
}

.fbm-qr-charts {
    margin-top: 30px;
}

.fbm-qr-chart-container {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fbm-qr-chart-container h4 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
}

.fbm-qr-chart-container canvas {
    max-height: 300px;
}

/* Folders */
.fbm-qr-folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fbm-qr-folder-item {
    padding: 20px;
}

.fbm-qr-folder-name {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.fbm-qr-folder-description {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 14px;
}

.fbm-qr-folder-meta {
    margin-bottom: 15px;
}

.fbm-qr-folder-count {
    font-size: 12px;
    color: #6c757d;
}

.fbm-qr-categories-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.fbm-qr-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fbm-qr-categories-list li {
    padding: 8px 15px;
    background: #e9ecef;
    border-radius: 20px;
}

.fbm-qr-categories-list a {
    text-decoration: none;
    color: #495057;
    font-weight: 500;
}

.fbm-qr-categories-list a:hover {
    color: #007bff;
}

/* Global Stats */
.fbm-qr-top-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fbm-qr-top-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.fbm-qr-top-title {
    font-weight: 500;
}

.fbm-qr-top-count {
    color: #6c757d;
    font-size: 14px;
}

/* Empty State */
.fbm-qr-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

/* Media Button */
.fbm-qr-media-button {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .fbm-qr-tabs {
        flex-direction: column;
    }
    
    .fbm-qr-tab {
        border-bottom: 1px solid #e9ecef;
        border-left: 3px solid transparent;
    }
    
    .fbm-qr-tab.is-active {
        border-left-color: #007bff;
        border-bottom-color: #e9ecef;
    }
    
    .fbm-qr-form-row,
    .fbm-qr-filter-row {
        grid-template-columns: 1fr;
    }
    
    .fbm-qr-grid,
    .fbm-qr-folders-grid {
        grid-template-columns: 1fr;
    }
    
    .fbm-qr-stats-overview {
        grid-template-columns: 1fr;
    }
}

/* Download Page */
.fbm-qr-download-page {
    max-width: 1200px;
    width: 100%;
    margin: 20px auto;
    padding: 0 20px;
}

.fbm-qr-download-title {
    margin-top: 0;
    margin-bottom: 30px;
    color: #212529;
    font-size: 28px;
    font-weight: 600;
}

.fbm-qr-download-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.fbm-qr-download-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fbm-qr-preview-image {
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fbm-qr-large-preview {
    max-width: 100%;
    height: auto;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.fbm-qr-info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.fbm-qr-info-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #212529;
    font-size: 18px;
    font-weight: 600;
}

.fbm-qr-info-table {
    width: 100%;
    border-collapse: collapse;
}

.fbm-qr-info-table td {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.fbm-qr-info-table td:first-child {
    width: 140px;
    color: #6c757d;
}

.fbm-qr-payload-code {
    font-size: 11px;
    word-break: break-all;
    color: #495057;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    max-width: 100%;
}

.fbm-qr-link {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
}

.fbm-qr-link:hover {
    text-decoration: underline;
}

.fbm-qr-download-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fbm-qr-download-options h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #212529;
    font-size: 20px;
    font-weight: 600;
}

.fbm-qr-download-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.fbm-qr-download-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 16px;
    font-weight: 500;
}

.fbm-qr-download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fbm-qr-download-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.fbm-qr-download-actions h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    font-size: 16px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .fbm-qr-download-content {
        grid-template-columns: 1fr;
    }
    
    .fbm-qr-download-buttons {
        flex-direction: column;
    }
    
    .fbm-qr-download-buttons .btn {
        width: 100%;
    }
}

