/* frontend/brand-training.css - Brand Training UI Styles */

.brand-training-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #3b82f6;
}

.brand-training-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #f1f5f9;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.brand-training-info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.brand-training-info p {
    margin: 0.5rem 0;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.brand-training-info strong {
    color: #f1f5f9;
}

/* Brand Rules Grid */
.brand-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.25rem;
}

.brand-rule-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.brand-rule-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.brand-rule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3b82f6;
}

.brand-actions {
    display: flex;
    gap: 0.5rem;
}

.brand-rule-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rule-section {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rule-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rule-value {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    color: #e2e8f0;
}

/* Badges */
.keyword-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 12px;
    font-size: 0.85rem;
    color: #86efac;
    font-weight: 500;
}

.supplier-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    font-size: 0.85rem;
    color: #93c5fd;
    font-weight: 500;
}

.no-rules {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
    font-size: 1.1rem;
}

/* Pattern Discovery */
.pattern-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 6px;
}

.pattern-card strong {
    color: #3b82f6;
    font-size: 1.05rem;
}

.pattern-card .badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    color: #93c5fd;
}

/* Icon Buttons */
.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    color: #94a3b8;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: #f1f5f9;
    transform: scale(1.1);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-dialog {
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.modal-header h3 {
    margin: 0;
    color: #f1f5f9;
    font-size: 1.3rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .brand-rules-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-training-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
}
