/* Shared UI Components - Atlacor */
/* This file contains reusable UI components used across all apps */

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.badge-warning {
    background-color: rgb(251 191 36);
    color: rgb(120 53 15);
}

.badge-danger {
    background-color: rgb(239 68 68);
    color: white;
}

.badge-success {
    background-color: rgb(34 197 94);
    color: white;
}

.badge-primary {
    background-color: rgb(59 130 246);
    color: white;
}

.badge-secondary {
    background-color: rgb(107 114 128);
    color: white;
}

.badge-info {
    background-color: rgb(14 165 233);
    color: white;
}

/* Button Base Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    height: 2.5rem;
    padding: 0 1rem;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: rgb(59 130 246);
    color: white;
}

.btn-primary:hover {
    background-color: rgb(37 99 235);
    color: white;
}

.btn-secondary {
    background-color: rgb(107 114 128);
    color: white;
}

.btn-secondary:hover {
    background-color: rgb(75 85 99);
    color: white;
}

.btn-success {
    background-color: rgb(34 197 94);
    color: white;
}

.btn-success:hover {
    background-color: rgb(22 163 74);
    color: white;
}

.btn-danger {
    background-color: rgb(239 68 68);
    color: white;
}

.btn-danger:hover {
    background-color: rgb(220 38 38);
    color: white;
}

.btn-warning {
    background-color: rgb(251 191 36);
    color: rgb(120 53 15);
}

.btn-warning:hover {
    background-color: rgb(245 158 11);
    color: rgb(120 53 15);
}

.btn-outline-primary {
    background-color: white;
    color: rgb(59 130 246);
    border-color: rgb(59 130 246);
}

.btn-outline-primary:hover {
    background-color: rgb(59 130 246);
    color: white;
}

.btn-outline-secondary {
    background-color: white;
    color: rgb(107 114 128);
    border-color: rgb(107 114 128);
}

.btn-outline-secondary:hover {
    background-color: rgb(107 114 128);
    color: white;
}

.btn-outline-danger {
    background-color: white;
    color: rgb(239 68 68);
    border-color: rgb(239 68 68);
}

.btn-outline-danger:hover {
    background-color: rgb(239 68 68);
    color: white;
}

.btn-outline {
    background-color: white;
    color: rgb(107 114 128);
    border-color: rgb(209 213 219);
}

.btn-outline:hover {
    background-color: rgb(249 250 251);
    color: rgb(75 85 99);
}

.btn-sm {
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

/* Card Styles */
.card {
    background-color: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Form Styles */
.form-control,
.form-input,
.form-select {
    display: block;
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgb(209 213 219);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    background-color: white;
}

.form-control:focus,
.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.textarea {
    resize: vertical;
    min-height: 2.5rem;
}

/* Alert Styles */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
}

.alert-success {
    color: rgb(22 101 52);
    background-color: rgb(220 252 231);
    border-color: rgb(187 247 208);
}

.alert-danger {
    color: rgb(127 29 29);
    background-color: rgb(254 226 226);
    border-color: rgb(252 165 165);
}

.alert-warning {
    color: rgb(133 77 14);
    background-color: rgb(254 249 195);
    border-color: rgb(254 240 138);
}

.alert-info {
    color: rgb(30 64 175);
    background-color: rgb(219 234 254);
    border-color: rgb(147 197 253);
}

/* Utility Classes */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Loading Spinner */
.spinner {
    border: 2px solid rgb(243 244 246);
    border-top: 2px solid rgb(59 130 246);
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgb(229 231 235);
}

.table th {
    font-weight: 600;
    color: rgb(55 65 81);
    background-color: rgb(249 250 251);
}

.table tbody tr:hover {
    background-color: rgb(249 250 251);
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
    padding: 0 0.75rem;
    color: rgb(75 85 99);
    background-color: white;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.pagination li a:hover {
    background-color: rgb(249 250 251);
    color: rgb(59 130 246);
}

.pagination li.active span {
    background-color: rgb(59 130 246);
    color: white;
    border-color: rgb(59 130 246);
}

/* Remove Button (for saved items) */
.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    font-size: 14px;
    opacity: 1;
    transition: all 0.2s ease;
    z-index: 10;
}

.remove-btn:hover {
    background-color: rgb(220, 38, 38);
    transform: scale(1.1);
}
