/* CloudSign Templates Styles */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-purple) 100%);
    color: white;
    border-radius: 12px;
}

.page-header h1 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Search Section */
.search-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(11, 83, 148, 0.1);
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.template-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: var(--primary-blue);
}

.template-preview {
    background-color: var(--light-gray);
    padding: 2rem;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.template-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.template-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0 0 0.5rem 0;
}

.template-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    flex: 1;
}

.template-meta {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0.5rem 0;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.template-actions .btn-primary,
.template-actions .btn-secondary {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Empty State */
.empty-state-templates {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state-templates h2 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.empty-state-templates p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .page-header .btn-primary-large {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .search-section {
        flex-direction: column;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .template-actions {
        flex-direction: column;
    }

    .template-actions .btn-primary,
    .template-actions .btn-secondary {
        width: 100%;
    }
}
