@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

:root {
    --bg-dark-disabled: #2125299c;

    --order-status: #000;
    --order-placed: #009688;
    --order-shipped: #e27316;
    --order-delivered: #18a32a;
    --order-cancelled: #c61b1b;
    --order-refunded: #e90d5c;
}

* {
    padding: 0;
    margin: 0;
}

*,
html {
    font-family: "DM Sans", serif;
}

body {
    height: 100vh;
}

/**
 * Login Page
 **/

.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form {
    width: 400px;
    background: #eee;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 10px;
}

.login-form h1 {
    font-size: 40px;
    text-align: center;
    padding: 20px 0;
}

.login-form button {
    border-radius: 5px;
    cursor: pointer;
    background: #000;
    border: 0;
    color: #fff;
    padding: 12px;
    font-size: 15px;
}

.login-form .alert {
    margin-bottom: 10px;
}

.input-check {
    padding-bottom: 15px;
    display: flex;
}

.input-check input {
    margin-right: 10px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group input,
.input-group select,
.input-group textarea {
    display: block;
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    font-size: 15px;
    border: 1px solid #d4d4d4;
    border-radius: 5px;
}

.input-group label {
    display: block;
    padding-bottom: 5px;
    font-weight: 600;
}

.input-col {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
} 

.input-col .input-group {
    width: 100%;
    margin-bottom: 0px;
}

.radio-group {
    margin-bottom: 15px;
}

.radio-group label:first-child {
    display: block;
    padding-bottom: 5px;
    font-weight: 600;
}

.radio-group input:not(:first-of-type) {
    margin-left: 10px;
}

/**
 * Header
 **/
.header {
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 111;
    height: 60px;
    padding: 0 15px;
}

.header .header__info a {
    text-decoration: none;
}

/**
 * Sidebar
 **/
.sidebar {
    width: 15%;
    background: #e0e0e0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
}

.sidebar a {
    color: #000;
    padding: 12px 20px;
    text-decoration: none;
    font-size: 17px;
    transition: 500ms ease-in-out all;
}

.sidebar a:hover {
    background: #000;
    color: #fff;
}

.sidebar .active {
    background: #000000d4;
    color: #fff;
}

.sidebar hr {
    border: 1px solid #c8c8c8;
    border-radius: 100px;
}

/**
 * Content
 **/
.content {
    margin-left: 15%;
    padding: 25px 40px;
    margin-top: 60px;
}

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

table th {
    background: #000;
    padding: 8px;
    color: #fff;
    border: 1px solid #484848;
    text-align: center;
}

table td {
    padding: 8px;
    border: 1px solid #dddddd;
    text-align: center;
}

table td:first-child,
table th:first-child {
  width: 100px; /* or even less, depending on your needs */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table td:last-child {
    width: 150px;
}

tr.htmx-swapping td {
    opacity: 0;
    transition: opacity 1s ease-out;
}

/**
 * Media List
 **/
.media-list {
    border: 1px solid #dddddd;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-column-gap: 5px;
    grid-row-gap: 5px;
}

.media-list__item img {
    width: 300px;
    height: 300px;
    object-fit: cover;
}

/**
 * Media Selection
 **/
.media-action {
    text-align: right;
    margin-top: 10px;
}


/**
 * Order Details
 **/
.order-details{
    margin: 0 auto;
    padding: 30px;
    max-height: 600px;
    overflow-y: auto;
}

.order-details hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 20px 0;
}

.order-details__section {
  margin-bottom: 25px;
}

.address-section {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.address-section div {
  width: 48%;
}

.order-summary {
  text-align: right;
}

.order-summary p {
  margin: 6px 0;
}

.order-summary .total {
  font-size: 1.3em;
  color: #000;
}

/**
 * Order Status
 **/
.order-status {
    width: 135px;
    text-align: center;
    border-radius: 5px;
    padding: 5px 0px;
    background: var(--order-status);
    color: #fff;
    border: 0;
    text-transform: uppercase;
}

.order-status--order-placed{
    background: var(--order-placed);
}

.order-status--shipped {
    background: var(--order-shipped);
}

.order-status--cancelled {
    background: var(--order-cancelled);
}

.order-status--refunded {
    background: var(--order-refunded);
}

.order-status--delivered {
    background: var(--order-delivered);
}


/**
 * Utilities
 **/
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    margin-bottom: 15px;
}

.section-head .actions {
    display: flex;
    align-items: center;
    justify-content: center;
}


.section-head .filter input {
    padding: 10px 15px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    font-size: 15px;
    border: 1px solid #d4d4d4;
    border-radius: 5px;
    width: 200px;
    transition: 500ms ease-in-out all;
}

.section-head .filter input:focus {
    width: 300px;
}

.section--form {
    width: 35%;
}

.section--form h1 {
    padding: 10px 0px;
}

.section__action {
    text-align: end;
    margin-bottom: 10px;
}

.text-muted {
    color: #a4a4a4;
}

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 17px;
}

.alert i {
    margin-right: 5px;
}

.alert--success {
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
}

.alert--danger {
    background: #f8d7da;
    border: 1px solid #f1aeb5;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    margin-left: 4px;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.btn--sm {
    padding: 5px 10px;
}

.btn--primary {
    background: #0d6efd;
    color: #fff;
}

.btn--dark {
    background: #212529;
    color: #fff;
}

.btn--dark:disabled {
    background: var(--bg-dark-disabled) !important;
}

.btn--danger {
    color: #fff;
    background: #dc3545;
}

.invalid-feedback {
    color: #df1f30;
    margin-top: 5px;
}

.invalid-field {
    border-color: #df1f30 !important;
}

.pagination {
    padding: 10px 0;
}

.pagination a {
    text-decoration: none;
    padding: 10px 15px;
    display: inline-block;
    border-radius: 5px;
    border: 1px solid #000;
}

.page--active {
    background: #000;
    color: #fff;
}

.indicator {
    width: 15px;
    height: 15px;
    border-radius: 100px;
    content: '';
    display: inline-block;
}

.indicator--inactive {
    background: #dc3545;
}

.indicator--active {
    background: green;
}

.display-image img {
    width: auto;
    height: 300px;
    border: 1px solid #d4d4d4;
    padding: 10px;
    margin-bottom: 10px;
}

.display-image p {
    margin-bottom: 10px;
}

.d-none {
    display: none;
}
