/* Elementor Template Manager Frontend Styles */
.etm-templates-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.etm-filter-bar {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.etm-template-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.etm-template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.etm-template-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #eee;
}

.etm-template-content {
    padding: 15px;
}

.etm-template-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.etm-template-type {
    display: inline-block;
    background-color: #f2f2f2;
    padding: 3px 10px;
    border-radius: 3px;
    margin-bottom: 15px;
    font-size: 12px;
}

.etm-template-actions {
    display: flex;
    gap: 10px;
}

.etm-button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    flex: 1;
    text-decoration: none;
    display: inline-block;
}

.etm-button-primary {
    background-color: #0073aa;
    color: white;
}

.etm-button-secondary {
    background-color: #f7f7f7;
    color: #333;
    border: 1px solid #ddd;
}

.etm-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.etm-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 1000px;
    position: relative;
    max-height: 80vh;
    overflow: auto;
}

.etm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.etm-modal-body {
    margin-bottom: 20px;
    min-height: 300px;
}

.etm-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.etm-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.etm-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

.etm-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: etm-spin 1s linear infinite;
}

@keyframes etm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}