/* Workflow Library Styles */

/* Hero Section */
.workflow-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.workflow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--text-dark);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.workflow-badge-icon {
    font-size: 1.125rem;
}

/* Auth Status */
.auth-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success-color);
    border-radius: 12px;
    margin-top: 24px;
}

.auth-status-message {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success-color);
    font-weight: 500;
}

.auth-status-message i {
    font-size: 1.25rem;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.btn-text:hover {
    color: var(--text-dark);
}

/* Filters Section */
.workflow-filters {
    padding: 40px 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.search-container {
    position: relative;
    max-width: 600px;
    width: 100%;
}

.search-container i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 196, 77, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-tag {
    padding: 8px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
}

.category-tag.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-dark);
}

.sort-select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-white);
    cursor: pointer;
    max-width: 250px;
}

.results-count {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.results-count span {
    font-weight: 600;
    color: var(--text-dark);
}

/* Workflow Grid */
.workflow-grid-section {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

/* Workflow Card */
.workflow-card {
    background: var(--bg-white);
    border: var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.workflow-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.workflow-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
}

.workflow-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.workflow-card:hover .workflow-card-image img {
    transform: scale(1.05);
}

.workflow-difficulty {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.difficulty-beginner {
    color: var(--success-color);
}

.difficulty-intermediate {
    color: #f59e0b;
}

.difficulty-advanced {
    color: #ef4444;
}

.workflow-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.workflow-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.workflow-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.3;
}

.workflow-card-description {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
    flex: 1;
}

.workflow-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
}

.workflow-card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.workflow-card-meta-item i {
    color: var(--primary-color);
}

.workflow-card-footer {
    padding: 16px 24px;
    background: var(--bg-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workflow-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.workflow-tag {
    padding: 4px 8px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.workflow-card-action {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.workflow-card-action i {
    transition: transform 0.3s ease;
}

.workflow-card:hover .workflow-card-action i {
    transform: translateX(4px);
}

/* Loading & Empty States */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

.loading-state p {
    color: var(--text-light);
    font-size: 1rem;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 24px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

/* CTA Section */
.workflow-cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, #C99A38 100%);
    color: var(--text-dark);
    padding: 5rem 0;
    text-align: center;
}

.workflow-cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.workflow-cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.workflow-cta-content p {
    font-size: 1.125rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.workflow-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.workflow-cta-buttons .btn {
    transition: all 0.3s ease !important;
    transform: translateY(0) !important;
}

.workflow-cta-buttons .btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(16, 18, 17, 0.3);
}

.workflow-cta-buttons .btn:active {
    transform: translateY(0) !important;
}

/* Auth Modal */
.workflow-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.workflow-modal.hidden {
    display: none;
}

.workflow-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.workflow-modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.workflow-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.workflow-modal-close:hover {
    background: var(--border-color);
    transform: rotate(90deg);
}

.workflow-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.workflow-modal-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.workflow-modal-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.workflow-modal-header p {
    font-size: 0.9375rem;
    color: var(--text-light);
}

.workflow-modal-header.danger i {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.workflow-modal-header.danger h2 {
    color: #dc2626;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn {
    width: 100%;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-input {
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 196, 77, 0.1);
}

.form-benefits {
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
}

.form-benefits h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.form-benefits ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-benefits li i {
    color: var(--success-color);
    font-size: 1rem;
}

.form-privacy {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.5;
}

.form-privacy a {
    color: var(--primary-color);
    text-decoration: underline;
}

.btn-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.auth-success {
    text-align: center;
}

.auth-success i {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 24px;
}

.auth-success h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.auth-success p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {

    .workflow-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .category-tags {
        gap: 8px;
    }

    .category-tag {
        font-size: 0.8125rem;
        padding: 6px 12px;
    }

    .workflow-modal-content {
        padding: 32px 24px;
    }

    .workflow-cta-content h2 {
        font-size: 1.75rem;
    }
}
