<div class="modal-overlay">
<div class="modal">
<div class="modal-header">
<h3>Modal Title</h3>
<button class="close-btn">×</button>
</div>
<div class="modal-body">
<p>This is the modal content area. You can place any content here.</p>
</div>
<div class="modal-footer">
<button class="btn-cancel">Cancel</button>
<button class="btn-confirm">Confirm</button>
</div>
</div>
</div>.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal {
background-color: white;
width: 400px;
max-width: 90%;
border-radius: 12px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
overflow: hidden;
animation: fadeIn 0.3s ease-out;
}
.modal-header {
padding: 16px 24px;
border-bottom: 1px solid #e2e8f0;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
margin: 0;
color: #1e293b;
font-size: 18px;
}
.close-btn {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #94a3b8;
}
.modal-body {
padding: 24px;
color: #475569;
line-height: 1.5;
}
.modal-footer {
padding: 16px 24px;
background-color: #f8fafc;
display: flex;
justify-content: flex-end;
gap: 12px;
}
.btn-cancel {
padding: 8px 16px;
border: 1px solid #cbd5e1;
background-color: white;
border-radius: 6px;
cursor: pointer;
font-weight: 500;
}
.btn-confirm {
padding: 8px 16px;
background-color: #3b82f6;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 500;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}