/**
 * SHOPMACHINE SYSTEM - FRONTEND COMPONENTS CSS
 * ==========================================
 * Zentrale CSS-Datei für alle Frontend-Komponenten
 * Ausgelagert aus Inline-Styles der Frontend-Templates
 */

/* =============================================================================
   1. SHOPMACHINE DASHBOARD COMPONENTS
   ============================================================================= */

/* Dashboard-Container */
.shopmachine-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.shopmachine-dashboard h2 {
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

/* Dashboard-Statistiken */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
}

.stat-box:hover::before {
    opacity: 1;
}

.stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-box p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
}

/* Spezifische Stat-Box-Farben */
.stat-box.earnings {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stat-box.orders {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-box.clicks {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-box.conversion {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* =============================================================================
   2. ORDERS TABLE COMPONENTS
   ============================================================================= */

/* Bestellungen-Tabelle */
.orders-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.orders-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid #f1f2f6;
    padding-bottom: 15px;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.orders-table th {
    background: #0D5D8D;
    color: white;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f2f6;
    color: #2c3e50;
    font-size: 14px;
}

.orders-table tbody tr {
    transition: background-color 0.2s ease;
}

.orders-table tbody tr:hover {
    background-color: #f8f9fa;
}

.orders-table tbody tr:last-child td {
    border-bottom: none;
}

/* Tabellen-Status-Badges */
.orders-table .status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orders-table .status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.orders-table .status-completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.orders-table .status-processing {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #99d3ff;
}

.orders-table .status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.orders-table .status-paid {
    background: #e6f3ff;
    color: #1e3a8a;
    border: 1px solid #a3d2ff;
}

/* Provision bezahlt am Spalte */
.orders-table .provision-paid-date {
    text-align: center;
    white-space: nowrap;
}

.orders-table .provision-paid-date .text-muted {
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
}

/* =============================================================================
   3. LOGIN FORM COMPONENTS
   ============================================================================= */

/* Login-Container */
.shopmachine-login-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.shopmachine-login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.shopmachine-login-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.shopmachine-login-body {
    padding: 30px;
}

.shopmachine-login-form .form-group {
    margin-bottom: 20px;
}

.shopmachine-login-form label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.shopmachine-login-form input[type="text"],
.shopmachine-login-form input[type="email"],
.shopmachine-login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.shopmachine-login-form input:focus {
    outline: none;
    border-color: #0D5D8D;
    box-shadow: 0 0 0 3px rgba(13, 93, 141, 0.1);
}

.shopmachine-login-form .submit-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shopmachine-login-form .submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.shopmachine-login-form .submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form-Nachrichten */
.form-messages {
    margin-bottom: 20px;
}

.form-message {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.form-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Loading-Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================================================
   4. ACCESS DENIED PAGE COMPONENTS
   ============================================================================= */

/* Zugriff-verweigert-Seite */
.shopmachine-access-denied {
    max-width: 500px;
    margin: 100px auto;
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.shopmachine-access-denied h2 {
    color: #e74c3c;
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 600;
}

.shopmachine-access-denied p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.shopmachine-access-denied .login-button {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shopmachine-access-denied .login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

/* =============================================================================
   5. REGISTRATION FORM COMPONENTS
   ============================================================================= */

/* Registrierungs-Container */
.shopmachine-registration-container {
    max-width: 600px;
    margin: 30px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.shopmachine-registration-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.shopmachine-registration-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.shopmachine-registration-body {
    padding: 30px;
}

.registration-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.registration-form .form-group {
    margin-bottom: 20px;
}

.registration-form .form-group.full-width {
    grid-column: 1 / -1;
}

.registration-form label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
}

.registration-form input,
.registration-form select,
.registration-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.registration-form input:focus,
.registration-form select:focus,
.registration-form textarea:focus {
    outline: none;
    border-color: #0D5D8D;
    box-shadow: 0 0 0 3px rgba(13, 93, 141, 0.1);
}

.registration-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Medium-URL-Felder (conditional display) */
.medium-url-field {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.medium-url-field.active {
    display: block;
}

.medium-url-field label {
    margin-bottom: 5px;
    font-size: 13px;
    color: #666;
}

/* =============================================================================
   6. ORDER FORM COMPONENTS
   ============================================================================= */

/* Bestellformular-Container */
.customer-order-container {
    max-width: 800px;
    margin: 30px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.customer-order-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.customer-order-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.customer-order-body {
    padding: 30px;
}

/* Produkt-Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.product-card:hover {
    border-color: #0D5D8D;
    transform: translateY(-2px);
}

.product-card.selected {
    border-color: #0D5D8D;
    background: linear-gradient(135deg, rgba(13, 93, 141, 0.1) 0%, rgba(10, 74, 110, 0.1) 100%);
}

.product-card h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.product-card .price {
    font-size: 24px;
    font-weight: 700;
    color: #0D5D8D;
    margin-bottom: 15px;
}

.product-card .description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Bestellsummary */
.order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.order-summary h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-row.total {
    font-weight: 700;
    font-size: 16px;
    color: #2c3e50;
    border-top: 1px solid #dee2e6;
    padding-top: 10px;
    margin-top: 15px;
}

/* =============================================================================
   7. RESPONSIVE DESIGN
   ============================================================================= */

/* Tablet-Ansicht */
@media (max-width: 768px) {
    .shopmachine-dashboard {
        padding: 15px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-box {
        padding: 20px;
    }
    
    .orders-section {
        padding: 20px;
    }
    
    .orders-table {
        font-size: 12px;
    }
    
    .orders-table th,
    .orders-table td {
        padding: 10px;
    }
    
    .shopmachine-login-container,
    .shopmachine-registration-container,
    .customer-order-container {
        margin: 20px;
        max-width: none;
    }
    
    .shopmachine-login-body,
    .shopmachine-registration-body,
    .customer-order-body {
        padding: 20px;
    }
    
    .registration-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile-Ansicht */
@media (max-width: 480px) {
    .shopmachine-dashboard h2 {
        font-size: 24px;
    }
    
    .stat-box h3 {
        font-size: 24px;
    }
    
    .stat-box p {
        font-size: 14px;
    }
    
    .orders-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .shopmachine-login-header,
    .shopmachine-registration-header,
    .customer-order-header {
        padding: 20px;
    }
    
    .shopmachine-login-header h2,
    .shopmachine-registration-header h2,
    .customer-order-header h2 {
        font-size: 20px;
    }
    
    .shopmachine-access-denied {
        margin: 50px 20px;
        padding: 30px 20px;
    }
    
    .shopmachine-access-denied h2 {
        font-size: 24px;
    }
}

/* =============================================================================
   8. UTILITY CLASSES
   ============================================================================= */

/* Display-Control */
.hide {
    display: none !important;
}

.show-block {
    display: block !important;
}

.show-inline {
    display: inline !important;
}

.show-flex {
    display: flex !important;
}

/* Spacing */
.mb-0 { margin-bottom: 0 !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-30 { margin-bottom: 30px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-10 { margin-top: 10px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-30 { margin-top: 30px !important; }

.p-0 { padding: 0 !important; }
.p-10 { padding: 10px !important; }
.p-15 { padding: 15px !important; }
.p-20 { padding: 20px !important; }

/* Text-Utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.text-muted { color: #666 !important; }
.text-primary { color: #0D5D8D !important; }
.text-success { color: #155724 !important; }
.text-error { color: #721c24 !important; }

.font-weight-normal { font-weight: 400 !important; }
.font-weight-bold { font-weight: 600 !important; }

.font-size-12 { font-size: 12px !important; }
.font-size-14 { font-size: 14px !important; }
.font-size-16 { font-size: 16px !important; }
.font-size-18 { font-size: 18px !important; }