html {
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
}

*, *:before, *:after {
    box-sizing: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #F7F7F7;
}

main {
    flex: 1 0 auto;
}

i.material-icons {
    user-select: none;
}

i.material-icons.inline {
    position: relative;
    top: 8px;
    font-size: 30px;
    margin-top: -8px;
    margin-right: 8px;
}

i.material-icons.inline.medium {
    font-size: 24px;
    top: 4px;
}

.icon-false {
    color: #F44336;
    transform: rotate(45deg);
}

.icon-true {
    color: #4CAF50;
}

.icon-warning {
    color: #FFC107;
}

.mono {
    font-family: Consolas, monospace;
}

#masthead {
    background-color: #2196F3;
    color: white;
    padding: 0.5rem;
    display: flex;
}

#pagehead {
    background-color: #03A9F4;
    color: white;
    padding: 0.5rem;
    display: flex;
}

h1, h2 {
    font-size: 2rem;
    line-height: 2rem;
    margin: 0;
}

h2 {
    flex: 1;
}

h2.sub-heading {
    margin-top: 1rem;
    margin-left: 2rem;
}

.dropdown {
    height: 40px;
    width: 40px;
    margin-top: -11px;
    margin-right: -12px;
    cursor: pointer;
    user-select: none;
    text-align: center;
    border-top-left-radius: 50%;
    border-top-right-radius: 50%;
}

.booking:not(.unavailable) .dropdown {
    margin-bottom: -12px;
}

.dropdown > i.material-icons {
    display: block;
    border-radius: 50%;
    height: 40px;
    width: 40px;
    line-height: 40px;
}

.dropdown:hover > i.material-icons, .dropdown:focus-within > i.material-icons {
    background-color: #EEE;
}

.dropdown .action-list {
    display: none;
    border-radius: 5px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.45);
    text-align: left;
    z-index: 98;
}

.dropdown:hover .action-list, .dropdown:focus-within .action-list {
    position: absolute;
    display: block;
    right: 0;
}

.dropdown .action-list a {
    width: 200px;
    padding: 0.75rem;
    position: relative;
    display: block;
    font-size: 1.1rem;
    background-color: white;
}

.dropdown .action-list a:first-child {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.dropdown .action-list a:last-child {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.dropdown .action-list a:hover {
    background-color: #EEE;
}

.cost {
    padding-right: 10px;
}

#pagehead .actions {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-end;
}

.actions a, input[type="submit"], a.add-row, a.delete-row {
    background-color: lightblue;
    padding: 0.5rem;
    line-height: 1rem;
    display: inline-block;
    border-radius: 0.2rem;
    color: white;
    border: none;
    cursor: pointer;
}

.actions a.create, .actions a.success, input[type="submit"], a.add-row {
    background: #43A047;
}

.actions a.edit, .actions a.modify {
    background: #FFC107;
}

.actions a.delete, .actions a.cancel, a.delete-row {
    background: red;
}

a.add-row, a.delete-row {
    margin-left: 1rem;
    margin-bottom: 1rem;
}

a.delete-row.delete-dress {
    margin-top: 1.3rem;
}

nav ul {
    list-style: none;
    margin: 0 0.5rem;
    padding: 0;
    display: flex;
}

nav a {
    line-height: 2rem;
    padding: 0 0.5rem;
}

section {
    margin: 1rem;
    /* overflow-x: scroll; */
}

section#user-filter {
    margin-bottom: 2rem;
}

.customer, .brand-dresses {
    background: white;
    padding: 1rem;
    display: flex;
}

.customer:last-child, .brand-dresses:last-child {
    margin-bottom 0;
}

.customer .details, .brand-dresses .details {
    flex: 1;
}

.customer .details h3, .brand-dresses .details h3 {
    margin: 0;
    line-height: 2rem;
}
.brand-dresses .details h3 {
    display: inline-block;
}

.brand-dresses .details .actions {
    display: inline-block;
    float: right;
}

.brand-dresses ul li {
    /* display: table; */
    /* table-layout: fixed; */
    /* width: 100%; */
    display: table-row;
}

.brand-dresses ul li span {
    display: table-cell;
    padding: 10px;
}

.brand-dresses ul li span.size-notes {
    width: 35%;
}

.brand-dresses ul li span a {
    color: #2196F3;
    text-decoration: underline;
}

/*.customer a.edit {
    background-color: red;
    color: white;
    padding: 0.5rem;
    line-height: 1rem;
    display: block;
    border-radius: 0.2rem;
}*/

label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

label.radio-label {
    display: inline-block;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

form ul {
    list-style: none;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

form ul li {
    margin-top: -5px;
}

form .helptext ul li, form ul.errorlist li {
    margin-top: 0;
}

form ul + br {
    display: none;
}

form img.form-image-preview {
    max-width: 100%;
    max-height: 200px;
    min-height: 50px;
    display: block;
    margin: 0 auto;
}

form .clear-file-wrapper {
    margin-left: 20px;
}

form label.clear-file-input {
    display: inline-block;
    margin: 0;
    font-weight: normal;
}

form img.booking-dress-image {
    max-width: 600px;
    max-height: 600px;
    display: block;
}

.formset th {
    padding-top: 1rem;
}

.formset.previewimageformset td:not(:first-child) {
    text-align: center;
}

.formset.previewimageformset input[type="number"] {
    width: 100px;
}

.image-size-warning {
    color: #EF6C00;
    font-weight: bold;
}

.column-form {
    display: flex;
    flex-wrap: wrap;
}

.column-form .form-col {
    flex: 1 0 45%;
}

.column-form .form-col:nth-child(n+3) {
    margin-top: 1rem;
}

ul.messages {
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 99;
}

ul.messages.stick {
    position: -webkit-sticky;
    position: sticky;
    top: 15px;
}

ul.messages li {
    margin: 0.5rem;
    font-weight: bold;
    padding: 5px 10px;
    border: 1px solid #8ccde2;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    background: #b5deec;
    color: #444;
}

ul.messages li.success {
    border:1px solid #b7e28c;
    background:#d1ecb5
}
ul.messages li.warning {
    border:1px solid #f3d988;
    background:#f8e8b7
}
ul.messages li.error {
    border:1px solid #e7a1a1;
    background:#ecb5b5
}

ul.errorlist {
    color: red;
    font-weight: bold;
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
}

.customer, .brand-dresses, .booking, .empty, .no-results, .filter-subsection-title, .subsection-title, .week-note,
.coupon-table {
    margin: 0 auto 1rem auto;
    max-width: 1200px;
    position: relative;
}

.daily-bookings-page .booking,
.daily-bookings-page .empty,
.daily-bookings-page .no-results,
.daily-bookings-page .filter-subsection-title,
.daily-bookings-page .subsection-title,
.daily-bookings-page .week-note {
    max-width: 1400px;
}

.sorting {
    margin-top: 0.5rem;
}

.sorting .sort-label {
    font-weight: bold;
    display: inline-block;
    margin-top: 0.5rem;
}

.sorting .sort-label label {
    margin: 0;
}

.sorting .sort-label label input[type="checkbox"]{
    position: relative;
    top: 2px;
    height: 15px;
    width: 15px;
}

.sorting a {
    text-decoration: underline;
    color: #2196F3;
    display: inline-block;
    margin-left: 0.5rem;
}

.sorting a.current-filter {
    color: black;
    font-weight: bold;
}

.filter {
    margin-bottom: 0.5rem;
}

.bookings-day-group {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

.bookings-column {
    flex: 1;
    padding: 0 1rem;
}

.bookings-column h3 {
    margin-top: 0;
}

.booking, .week-note {
    background: white;
    padding: 1rem;
}

.booking.deleted-dress {
    border-left: 0.5rem solid red;
    padding-left: 0.5rem;
}

.booking.not-starting {
    display: none;
}

.booking.collected {
    border-left: 0.25rem solid #90caf9;
    padding-left: 0.75rem;
}

.booking.returned {
    border-left: 0.25rem solid #a5d6a7;
    padding-left: 0.75rem;
}

.booking.packed {
    border-left: 0.25rem solid #d6a5d4;
    padding-left: 0.75rem;
}

.booking.flagged {
    background: #FFEBEE;
}

.booking .action-list a[data-booking-status="flagged"] {
    display: block;
}

.booking .action-list a[data-booking-status="clear-flag"] {
    display: none;
}

.booking.flagged .action-list a[data-booking-status="flagged"] {
    display: none;
}

.booking.flagged .action-list a[data-booking-status="clear-flag"] {
    display: block;
}

.booking:last-child {
    margin-bottom 0;
}

.booking .row, .week-note .row {
    display: flex;
}

.booking:not(.unavailable) .row:first-child {
    margin-bottom: 0.75rem;
}

.booking div.name {
    font-weight: bold;
    flex: 1;
}

.week-note .note-text {
    flex: 1;
}

.booking div.dates, .booking div.spacer, .booking div.type, .booking div.booking-notes, .booking div.created {
    flex: 1;
}

.booking div.created {
    font-style: italic;
}

.booking div.row.notes-row {
    margin-top: 0.75rem;
}

div.ownership-notes, label.edit-prompt {
    color: #03A9F4;
    font-weight: bold;
}

.booking.deleted-dress .deleted-prompt {
    color: red;
    font-weight: bold;
    display: block;
}

.booking div.register-link {
    padding-top: 1rem;
}

.booking div.register-link a {
    color: #C7102D;
    text-decoration: underline;
}

.booking .payment-confirmed {
    font-weight: bold;
    color: #43A047;
}

.booking .payment-not-confirmed {
    font-weight: bold;
    color: red;
}

input, textarea {
    padding: 2px 5px;
    line-height: 1.5;
}

select {
    padding: 3px 5px;
    line-height: 1.5;
    min-width: 70px;
}

input.autocomplete_userinput {
    width: 100%;
}

input[type="color"] {
    min-width: 200px;
}

.autocomplete-input {
    /*the container must be positioned relative:*/
    max-width: 500px;
    display: block;
    width: 100%;
    position: relative;
    display: inline-block;
}
.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    /*position the autocomplete items to be the same width as the container:*/
    top: 100%;
    left: 0;
    right: 0;
}
.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    background-color: #fff; 
    border-bottom: 1px solid #d4d4d4; 
}
.autocomplete-items div:hover {
    /*when hovering an item:*/
    background-color: #e9e9e9; 
}
.autocomplete-active {
    /*when navigating through the items using the arrow keys:*/
    background-color: DodgerBlue !important; 
    color: #ffffff; 
}
.autocomplete-items div strong, .autocomplete-items div span {
    display: block;
}

.currency-input {
  position: relative;
}

.currency-input > .symbol {
  position: absolute;
  display: block;
  transform: translate(0, -50%);
  top: 50%;
  pointer-events: none;
  width: 25px;
  text-align: center;
  font-style: normal;
}

.currency-input > input {
  padding-left: 25px;
  padding-right: 0;
}

a.assigned-customer {
    display: block;
    color: #2196F3;
    text-decoration: underline;
}

.brand-form {
    margin-bottom: 2rem;
}

.brand-form input[type="text"] {
    width: 450px;
}

.form-table {
    display: table;
    table-layout: fixed;
}

.form-table .form-row {
    display: table-row;
}

.size-rows, .dress-rows {
    display: table-row-group;
}

.form-table .form-row .cell {
    display: table-cell;
    vertical-align: top;
    padding-bottom: 10px;
}

.form-table .form-row .cell.checkbox {
    text-align: center;
    line-height: 2;
}

.form-table .form-row .cell.availability {
    display: none;
}

.form-table .form-row .cell label {
    margin-top: 0;
}

.form-table .form-row.header .cell {
    font-weight: bold;
    padding-bottom: 0.25rem;
}

.cell .currency-input input {
    width: 222px;
}

.error-text {
    display: none;
    color: red;
    font-weight: bold;
}

.stripe-url {
    margin: 0.5rem 0 1.5rem 1rem;
}

.stripe-url a, a.booking-link, a.visible {
    color: #2196F3;
    text-decoration: underline;
}

section#customer-bookings {
    margin-top: 5rem;
}

#coupons table, #customer-bookings table {
    border-spacing: 0;
}

#coupons table th:not(.super-heading), #customer-bookings table th:not(.super-heading) {
    border-bottom: 1px solid black;
    padding: 0.25rem;
}

#coupons table tr:nth-child(2n+3), #customer-bookings table tr:nth-child(2n+3) {
    background-color: white;
}

#coupons table td, #customer-bookings table td {
    padding: 0.5rem;
}

#coupons table td.icon-cell, #customer-bookings table td.icon-cell, #coupons table td.center, #customer-bookings table td.center {
    text-align: center;
}

td.warning {
    background-color :#FFEB9C;
    color: #9C5700;
}
td.error {
    background-color :#FFC7CE;
    color: #9C0006;
}

#id_customers_on_deck ~ br {
    display: none;
}

.results_on_deck .ui-icon.ui-icon-trash {
    background: none;
    height: 26px;
    width: 26px;
    line-height: 26px;
    transition: color 0.5s ease;
}

.results_on_deck .ui-icon.ui-icon-trash:before {
    content: "\e5cd";
    font-family: 'Material Icons';
    display: block;
    position: absolute;
    top: 1px;
    left: 0px;
    font-size: 22px;
    color: black;
    height: 32px;
    width: 32px;
    line-height: 26px;
    text-indent: 0;
    overflow: visible;
    transition: color 0.5s ease;
}

.results_on_deck .ui-icon.ui-icon-trash:hover:before {
    color: red;
}

.radiowrapper {
    display: inline-block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: pointer;
    margin-right: 15px;
    text-align: center;
    position: relative;
    margin-top: 0;
}

/* these make browser error messages (eg the required prompt)
   actually appear */
.radiowrapper input:not(.browser-default) {
    display: block;
    position: absolute;
    top: 30px;
    height: 1px;
    width: 1px;
    padding: 0;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    border: 0px solid transparent;
    user-select: none;
    z-index: -2;
    outline: none;
}

.radiowrapper .radio-button {
    border-radius: 3px;
    border: 1px solid black;
    display: block;
    padding: 12px 18px;
    transition-duration: 0.3s;
    min-width: 70px;
}

.radiowrapper:hover .radio-button, .radiowrapper:focus .radio-button, .radiowrapper:active .radio-button {
    background-color: #FCFCFC;
}

.radiowrapper:focus .radio-button, .radiowrapper input:focus ~ .radio-button {
    outline: #2196F3 auto 5px;
    outline: -webkit-focus-ring-color auto 5px;
}

.radiowrapper input:checked ~ .radio-button {
    background-color: #03A9F4;
    color: white;
}

.radiowrapper.exclusion:focus .radio-button, .radiowrapper.exclusion input:focus ~ .radio-button {
    outline: #F44336 auto 5px;
}

.radiowrapper.exclusion input:checked ~ .radio-button {
    background-color: #F44336;
    color: white;
}

.radiowrapper input:not(:checked):disabled ~ .radio-button {
    background: rgba(0, 0, 0, 0.15);
}

.radiowrapper input:checked:disabled ~ .radio-button {
    background: rgba(3, 169, 244, 0.6);
    color: black;
}

.admin-prompt {
    font-style: italic;
}

#login {
    text-align: center;
    margin: 2rem;
}

#login form {
    display: inline-block;
}

#login form label {
    text-align: left;
}

#login form input[type="submit"] {
    display: block;
    width: 100%;
}

.postage-option {
    display: block;
    margin: 5px;
}

.settings-content {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: clamp(min(100%, 400px), 80vw, 1200px);
    margin: 1rem auto;
    box-shadow: 1px 1px 5px 2px rgba(0, 0, 0, 0.1);
}

.settings-nav {
    flex: 1;
}

.settings-nav-item {
    padding: 0.7rem 1rem;
    padding-left: calc(1rem - 5px);
    background: rgba(255, 255, 255, 0.6);
    border-left: 5px solid rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    margin: 0.25rem;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-left: 5px solid rgb(179, 229, 252, 0.5);
}

.settings-nav-item.selected {
    border-left: 5px solid #03A9F4;
}

.settings-nav-item .material-icons {
    margin-right: 0.75rem;
}

.settings-form {
    flex: 3;
    margin-top: 0;
    max-width: calc(100vw - 2rem);
}

.settings-form label {
    display: inline-block;
}

.settings-form input[type="file"] {
    max-width: 100%;
}

.postage-table td, .postage-table th {
    padding: 0.25rem 1rem;
}

.settings-content.weekday-setup {
    padding: 1rem;
    display: block;
}

.back-prompt {
    max-width: 100px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: -0.7rem 0 0 -0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    transition: 0.25s background linear;
}

.back-prompt:hover {
    background: rgba(255, 255, 255, 0.9);
}

.wrap-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.wrap-cols .wrap-col {
    flex: 1;
}

@media only screen and (max-width: 1100px) {
    .bookings-day-group {
        flex-wrap: wrap;
    }

    .bookings-column {
        flex-basis: 100%;
    }
}

@media only screen and (max-width: 1000px) {
    .formset-table-wrapper {
        overflow-x: scroll;
        width: calc(100vw - 2rem);
    }
}

@media only screen and (max-width: 600px) {
    header #masthead {
        overflow-x: scroll;
    }
    
    header #masthead h1 {
        display: none;
    }
    
    header nav ul {
        margin: 0;
    }
    
    .hide-sm {
        display: none;
    }
}