/** * Component Styles - Reusable UI component styles * Buttons, cards, modals, forms, and other interactive elements */ /* Buttons */ .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; font-size: 0.875rem; font-weight: 500; text-decoration: none; border: none; border-radius: 0.375rem; cursor: pointer; transition: all 0.2s ease-in-out; min-height: 44px; /* Touch-friendly minimum */ gap: 0.5rem; } .btn:disabled { opacity: 0.6; cursor: not-allowed; } /* Button Variants */ .btn-primary { background-color: #3182ce; color: white; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .btn-primary:hover:not(:disabled) { background-color: #2c5282; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3); } .btn-secondary { background-color: #edf2f7; color: #4a5568; border: 1px solid #e2e8f0; } .btn-secondary:hover:not(:disabled) { background-color: #e2e8f0; border-color: #cbd5e0; } .btn-success { background-color: #38a169; color: white; } .btn-success:hover:not(:disabled) { background-color: #2f855a; } .btn-danger { background-color: #e53e3e; color: white; } .btn-danger:hover:not(:disabled) { background-color: #c53030; } /* Button Sizes */ .btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; min-height: 36px; } .btn-lg { padding: 1rem 2rem; font-size: 1rem; min-height: 52px; } /* Cards */ .card { background: white; border-radius: 0.5rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); border: 1px solid #e2e8f0; overflow: hidden; transition: all 0.2s ease-in-out; } .card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); transform: translateY(-2px); } .card-header { padding: 1rem; border-bottom: 1px solid #e2e8f0; background-color: #f7fafc; } .card-body { padding: 1rem; } .card-footer { padding: 1rem; border-top: 1px solid #e2e8f0; background-color: #f7fafc; } /* Grid Layout */ .grid { display: grid; gap: 1rem; } .grid-cols-1 { grid-template-columns: repeat(1, 1fr); } .grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .grid-cols-3 { grid-template-columns: repeat(3, 1fr); } .grid-cols-4 { grid-template-columns: repeat(4, 1fr); } @media (max-width: 768px) { .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; } } /* Modal */ .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; } .modal { background: white; border-radius: 0.5rem; box-shadow: 0 20px 25px rgba(0, 0, 0, 0.25); max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; animation: modalSlideIn 0.3s ease-out; } .modal-header { padding: 1.5rem; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; } .modal-title { font-size: 1.125rem; font-weight: 600; margin: 0; } .modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #718096; padding: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 0.25rem; } .modal-close:hover { background-color: #f7fafc; color: #2d3748; } .modal-body { padding: 1.5rem; } .modal-footer { padding: 1.5rem; border-top: 1px solid #e2e8f0; display: flex; gap: 0.5rem; justify-content: flex-end; } @keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } } /* Forms */ .form-group { margin-bottom: 1rem; } .form-label { display: block; font-size: 0.875rem; font-weight: 500; color: #374151; margin-bottom: 0.25rem; } .form-input { width: 100%; padding: 0.75rem; font-size: 0.875rem; border: 1px solid #d1d5db; border-radius: 0.375rem; background-color: white; transition: border-color 0.2s, box-shadow 0.2s; } .form-input:focus { outline: none; border-color: #3182ce; box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1); } .form-input:invalid { border-color: #e53e3e; } .form-textarea { resize: vertical; min-height: 100px; } .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em 1.5em; padding-right: 2.5rem; } /* Progress Bar */ .progress { width: 100%; height: 0.5rem; background-color: #e2e8f0; border-radius: 0.25rem; overflow: hidden; } .progress-bar { height: 100%; background-color: #3182ce; border-radius: 0.25rem; transition: width 0.3s ease; } .progress-bar.success { background-color: #38a169; } .progress-bar.warning { background-color: #d69e2e; } .progress-bar.danger { background-color: #e53e3e; } /* Badges */ .badge { display: inline-flex; align-items: center; padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 500; border-radius: 0.25rem; text-transform: uppercase; letter-spacing: 0.025em; } .badge-primary { background-color: #dbeafe; color: #1e40af; } .badge-success { background-color: #d1fae5; color: #065f46; } .badge-warning { background-color: #fef3c7; color: #92400e; } .badge-danger { background-color: #fee2e2; color: #991b1b; } /* Tooltips */ .tooltip { position: relative; display: inline-block; cursor: help; } .tooltip:hover::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background-color: #1a202c; color: white; padding: 0.5rem; border-radius: 0.25rem; font-size: 0.75rem; white-space: nowrap; z-index: 1000; margin-bottom: 0.25rem; } .tooltip:hover::before { content: ''; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: #1a202c; z-index: 1000; } /* Alerts */ .alert { padding: 1rem; border-radius: 0.375rem; margin-bottom: 1rem; border: 1px solid transparent; } .alert-info { background-color: #dbeafe; border-color: #bfdbfe; color: #1e40af; } .alert-success { background-color: #d1fae5; border-color: #a7f3d0; color: #065f46; } .alert-warning { background-color: #fef3c7; border-color: #fde68a; color: #92400e; } .alert-danger { background-color: #fee2e2; border-color: #fecaca; color: #991b1b; } /* Utility Classes */ .text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; } .hidden { display: none !important; } .visible { display: block !important; } .mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; } .p-1 { padding: 0.25rem; } .p-2 { padding: 0.5rem; } .p-4 { padding: 1rem; } .w-full { width: 100%; } .h-full { height: 100%; } .flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: 0.5rem; } .gap-4 { gap: 1rem; } /* Animations */ .fade-in { animation: fadeIn 0.3s ease-in; } .slide-up { animation: slideUp 0.3s ease-out; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }