/* 💡 Tips & Templates Modals */

.tips-modal,
.template-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tips-modal.active,
.template-modal.active {
    opacity: 1;
}

.tips-modal__backdrop,
.template-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.tips-modal__content,
.template-modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* 📚 Tips Modal Styles */
.tips-modal__content {
    width: 800px;
    max-width: 95vw;
    max-height: 85vh;
}

.tips-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
}

.tips-modal__header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.2em;
}

.tips-modal__close,
.template-modal__close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tips-modal__close:hover,
.template-modal__close:hover {
    background: #f0f0f0;
    color: #333;
}

.tips-modal__body {
    padding: 0 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.tip-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    transition: transform 0.2s ease;
}

.tip-card:hover {
    transform: translateX(2px);
}

.tip-card__icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.tip-card__content h4 {
    margin: 0 0 4px 0;
    color: var(--primary);
    font-size: 0.95em;
    font-weight: 600;
}

.tip-card__content p {
    margin: 0;
    color: #666;
    line-height: 1.4;
    font-size: 0.85em;
}

.tips-modal__footer,
.template-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 16px;
}

/* 🎨 Template Modal Styles */
.template-modal__content {
    width: 800px;
    max-width: 90vw;
}

.template-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 24px;
}

.template-modal__header h2 {
    margin: 0;
    color: var(--accent);
    font-size: 1.4em;
}

.template-modal__body {
    padding: 0 24px;
    display: grid;
    gap: 24px;
}

.template-preview h4 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 1.1em;
}

.template-sample {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.template-sample::before {
    content: "APERÇU";
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    opacity: 0.7;
}

.template-controls {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.template-controls label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.template-controls input[type="checkbox"] {
    transform: scale(1.2);
}

/* 💡 Tips Button Integration */
.tips-trigger {
    background: linear-gradient(45deg, #2196f3, #21cbf3);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.tips-trigger:hover {
    background: linear-gradient(45deg, #1976d2, #1cb5e0);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* 📱 Responsive */
@media (max-width: 768px) {
    .tips-modal__content,
    .template-modal__content {
        width: 95vw;
        height: 90vh;
        max-height: 90vh;
    }
    
    .tips-modal__body {
        max-height: 70vh;
    }
    
    .template-modal__body {
        grid-template-columns: 1fr;
    }
    
    .tip-card {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }
    
    .tip-card__icon {
        width: auto;
        font-size: 24px;
    }
    
    .tip-card__content h4 {
        font-size: 0.9em;
    }
    
    .tip-card__content p {
        font-size: 0.8em;
    }
    
    .tips-modal__footer,
    .template-modal__footer {
        flex-direction: column;
        padding: 12px 16px;
    }
    
    .tips-trigger {
        display: block;
        margin-top: 8px;
        margin-left: 0 !important;
    }
}
