/* ========== Shadcn/ui-inspired Components ========== */

:root {
    --border-radius: 0.5rem;
    --padding: 0.75rem 1rem;
    --transition: 0.2s ease;
}

/* Light Theme */
.theme-light {
    background-color: #fff;
    color: #000000;
}

/* Dark Theme */
.theme-dark {
    background-color: rgb(9, 9, 11);
    color: #ffffff;
}

/* Common Styles */
.shadcn-component {
    border-radius: var(--border-radius);
    padding: var(--padding);
    transition: all var(--transition);
}

/* Common Styles */
.shadcn-radius {
    border-radius: var(--border-radius);
}

.shadcn-padding {
    padding: var(--padding);
}

.shadcn-transition {
    transition: all var(--transition);
}

/* Buttons */
.btn-shadcn {
    font-weight: 500;
}

.btn-shadcn-light-primary {
    background-color: #fff;
    color: #000000;
    border: 1px solid #e5e7eb;
}

.btn-shadcn-light-primary:hover {
    background-color: #e2e2e2;
}

.btn-shadcn-light-secondary {
    background-color: #000000;
    color: #fff;
    border: 1px solid #000000;
}

.btn-shadcn-light-secondary:hover {
    background-color: #27272a;
}

.btn-shadcn-dark-primary {
    background-color: rgb(9, 9, 11);
    color: #ffffff;
    border: 1px solid #27272a;
}

.btn-shadcn-dark-primary:hover {
    background-color: #27272a;
}

.btn-shadcn-dark-secondary {
    background-color: #ffffff;
    color: rgb(9, 9, 11);
    border: 1px solid #ffffff;
}

.btn-shadcn-dark-secondary:hover {
    background-color: #e2e2e2;
}

/* Input, Select, Textarea */
.input-shadcn, .select-shadcn, .textarea-shadcn {
    width: 100%;
}

.input-shadcn-light, .select-shadcn-light, .textarea-shadcn-light {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    color: #000000;
}

.input-shadcn-dark, .select-shadcn-dark, .textarea-shadcn-dark {
    background-color: rgb(9, 9, 11);
    border: 1px solid #27272a;
    color: #ffffff;
}

.input-shadcn:focus, .select-shadcn:focus, .textarea-shadcn:focus {
    outline: none;
}

.input-shadcn-light:focus, .select-shadcn-light:focus, .textarea-shadcn-light:focus {
    border-color: #000000;
}

.input-shadcn-dark:focus, .select-shadcn-dark:focus, .textarea-shadcn-dark:focus {
    border-color: #ffffff;
}

/* Dropdown */
.dropdown-shadcn {
    position: relative;
}

.dropdown-menu-shadcn {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    border-radius: var(--border-radius);
}

.dropdown-menu-shadcn.show {
    display: block;
}

.dropdown-menu-light {
    background-color: #fff;
    border: 1px solid #e5e7eb;
}

.dropdown-menu-dark {
    background-color: rgb(9, 9, 11);
    border: 1px solid #27272a;
}

/* Label */
.label-shadcn {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.label-shadcn-light {
    color: #000000;
}

.label-shadcn-dark {
    color: #ffffff;
}

/* Form */
.card-shadcn-light {
    padding: var(--padding);
    background-color: #f3f4f6;
    color: #000000;
    border-color:#e5e7eb;
    border-radius: var(--border-radius);
}

.card--shadcn-dark {
    padding: var(--padding);
    background-color: #27272a;
    color: #ffffff;
    border-color: #27272a;
    border-radius: var(--border-radius);
}

/* Form */
.form-shadcn-light {
    padding: var(--padding);
    background-color: #f3f4f6;
    color: #000000;
    border-color:#e5e7eb;
    border-radius: var(--border-radius);
}

.form-shadcn-dark {
    padding: var(--padding);
    background-color: #27272a;
    color: #ffffff;
    border-color: #27272a;
    border-radius: var(--border-radius);
}

/* Table */
.table-shadcn {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-shadcn th,
.table-shadcn td {
    padding: var(--padding);
    text-align: left;
}

.table-shadcn-light {
    border: 1px solid #e5e7eb;
}

.table-shadcn-light th {
    background-color: #f3f4f6;
}

.table-shadcn-dark {
    border: 1px solid #27272a;
}

.table-shadcn-dark th {
    background-color: #18181b;
}

/* Badge */
.badge-shadcn {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-shadcn-light {
    background-color: #e5e7eb;
    color: #000000;
}

.badge-shadcn-dark {
    background-color: #27272a;
    color: #ffffff;
}

/* Alert */
.alert-shadcn {
    padding: var(--padding);
    margin-bottom: 1rem;
}

.alert-shadcn-light {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

.alert-shadcn-dark {
    background-color: #18181b;
    border: 1px solid #27272a;
    color: #f9fafb;
}

/* Error Alert */
.alert-error-light {
    background-color: #fee2e2;
    border: 1px solid #f87171;
    color: #991b1b;
}

.alert-error-dark {
    background-color: #7f1d1d;
    border: 1px solid #f87171;
    color: #fecaca;
}

/* Active States */
.theme-light .active {
    color: #000000 !important;
}

.theme-dark .active {
    color: #ffffff !important;
}

/* Tabs */
.tabs-shadcn {
    display: flex;
    border-bottom: 1px solid;
}

.tab-shadcn {
    padding: var(--padding);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.tab-shadcn:hover {
    opacity: 0.8;
}

.tab-shadcn.active {
    border-bottom-color: currentColor;
}

.tabs-shadcn-light {
    border-bottom-color: #e5e7eb;
}

.tab-shadcn-light {
    color: #6b7280;
}

.tab-shadcn-light.active {
    color: #000000;
}

.tabs-shadcn-dark {
    border-bottom-color: #27272a;
}

.tab-shadcn-dark {
    color: #9ca3af;
}

.tab-shadcn-dark.active {
    color: #ffffff;
}

/* Radio */
.radio-shadcn {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-shadcn input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid;
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all var(--transition);
}

.radio-shadcn input[type="radio"]:checked {
    background-color: currentColor;
    border-color: currentColor;
    box-shadow: inset 0 0 0 3px;
}

.radio-shadcn-light input[type="radio"] {
    border-color: #6b7280;
}

.radio-shadcn-light input[type="radio"]:checked {
    background-color: #000000;
    border-color: #000000;
    box-shadow: inset 0 0 0 3px #fff;
}

.radio-shadcn-dark input[type="radio"] {
    border-color: #9ca3af;
}

.radio-shadcn-dark input[type="radio"]:checked {
    background-color: #ffffff;
    border-color: #ffffff;
    box-shadow: inset 0 0 0 3px rgb(9, 9, 11);
}

/* Modal */
.modal-shadcn {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content-shadcn {
    max-width: 500px;
    width: 100%;
}

.modal-header-shadcn, .modal-body-shadcn, .modal-footer-shadcn {
    padding: var(--padding);
}

.modal-content-light {
    background-color: #fff;
    color: #000000;
}

.modal-content-dark {
    background-color: rgb(9, 9, 11);
    color: #ffffff;
}

/* Carousel */
.carousel-shadcn {
    position: relative;
    overflow: hidden;
}

.carousel-inner-shadcn {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item-shadcn {
    flex: 0 0 100%;
}

.carousel-control-shadcn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px;
    text-decoration: none;
}

.carousel-control-prev { left: 10px; }
.carousel-control-next { right: 10px; }

/* Progress Bar */
.progress-shadcn {
    height: 0.5rem;
    overflow: hidden;
}

.progress-bar-shadcn {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-light {
    background-color: #e5e7eb;
}

.progress-bar-light {
    background-color: #3b82f6;
}

.progress-dark {
    background-color: #27272a;
}

.progress-bar-dark {
    background-color: #60a5fa;
}

/* Tooltip */
.tooltip-shadcn {
    position: relative;
    display: inline-block;
}

.tooltip-content-shadcn {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-shadcn:hover .tooltip-content-shadcn {
    visibility: visible;
    opacity: 1;
}

.tooltip-light {
    background-color: #000000;
    color: #ffffff;
}

.tooltip-dark {
    background-color: #ffffff;
    color: #000000;
}

/* Popover */
.popover-shadcn {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.popover-content-shadcn {
    padding: var(--padding);
}

.popover-light {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    color: #000000;
}

.popover-dark {
    background-color: rgb(9, 9, 11);
    border: 1px solid #27272a;
    color: #ffffff;
}

/* Accordion/Collapse */
.accordion-shadcn {
    border: 1px solid;
}

.accordion-item-shadcn {
    border-bottom: 1px solid;
}

.accordion-header-shadcn {
    padding: var(--padding);
    cursor: pointer;
}

.accordion-body-shadcn {
    padding: var(--padding);
    display: none;
}

.accordion-light {
    border-color: #e5e7eb;
}

.accordion-dark {
    border-color: #27272a;
}

/* Spinner */
.spinner-shadcn {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25rem solid rgba(0, 0, 0, 0.1);
    border-right-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination-shadcn {
    display: flex;
    list-style-type: none;
    padding: 0;
}

.page-item-shadcn {
    margin: 0 0.25rem;
}

.page-link-shadcn {
    padding: 0.5rem 0.75rem;
    text-decoration: none;
}

.pagination-light .page-link-shadcn {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    color: #000000;
}

.pagination-dark .page-link-shadcn {
    background-color: rgb(9, 9, 11);
    border: 1px solid #27272a;
    color: #ffffff;
}

/* Breadcrumbs */
.breadcrumb-shadcn {
    display: flex;
    list-style-type: none;
    padding: 0;
}

.breadcrumb-item-shadcn {
    display: flex;
    align-items: center;
}

.breadcrumb-item-shadcn + .breadcrumb-item-shadcn::before {
    content: "/";
    padding: 0 0.5rem;
}

/* List Group */
.list-group-shadcn {
    list-style-type: none;
    padding: 0;
}

.list-group-item-shadcn {
    padding: var(--padding);
    border: 1px solid;
}

.list-group-light .list-group-item-shadcn {
    background-color: #fff;
    border-color: #e5e7eb;
    color: #000000;
}

.list-group-dark .list-group-item-shadcn {
    background-color: rgb(9, 9, 11);
    border-color: #27272a;
    color: #ffffff;
}
