/* Training Page Specific Styles */

.training-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
}

.back-btn {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: background 0.3s;
    font-size: 14px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.training-forms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.training-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.training-card h2 {
    margin-bottom: 8px;
    color: #333;
    font-size: 20px;
}

.card-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.training-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.training-form input[type="url"],
.training-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.training-form input[type="url"]:focus,
.training-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.training-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e8e8ff;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon {
    font-size: 48px;
}

.upload-content p {
    color: #666;
    margin: 0;
}

.file-name {
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    margin-top: 5px;
}

.submit-btn {
    padding: 12px 24px;
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

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

/* Training Data Section */
.training-data-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #333;
    font-size: 22px;
}

.refresh-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.refresh-btn:hover {
    background: #e0e0e0;
}

.training-data-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.training-data-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.training-data-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.data-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.data-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.data-type.url {
    background: #e3f2fd;
    color: #1976d2;
}

.data-type.pdf {
    background: #fff3e0;
    color: #f57c00;
}

.data-type.image {
    background: #f3e5f5;
    color: #7b1fa2;
}

.data-type.text {
    background: #e8f5e9;
    color: #388e3c;
}

.data-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.data-status.completed {
    background: #c8e6c9;
    color: #2e7d32;
}

.data-status.pending {
    background: #fff9c4;
    color: #f57f17;
}

.data-status.failed {
    background: #ffcdd2;
    color: #c62828;
}

.data-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    word-break: break-word;
}

.data-content {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    max-height: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.data-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #4caf50;
}

.toast.error {
    background: #f44336;
}

.toast.info {
    background: #2196f3;
}

/* Responsive */
@media (max-width: 768px) {
    .training-forms {
        grid-template-columns: 1fr;
    }

    .data-header {
        flex-direction: column;
        gap: 10px;
    }

    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(100px);
    }

    .toast.show {
        transform: translateY(0);
    }
}

