/*
 * My Orders Page - Tailwind CSS Styles
 * Replaces legacy stylesheet.css and stylesheet-myOrders.css
 */

/* Prevent scrolling past footer */
html, body {
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hide legacy dialog container from layout flow */
#boxes {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}

/* ==================== DIALOGS ==================== */

/* jQuery UI Dialog z-index override and width */
.ui-dialog {
  z-index: 9000 !important;
  width: 400px !important;
  max-width: 400px !important;
}

.ui-widget-overlay {
  z-index: 8999 !important;
}

/* ==================== FORM INPUTS ==================== */

/* Textarea styling */
textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 2px solid rgb(209 213 219);
  border-radius: 0.5rem;
  font-size: 1rem;
  line-height: 1.5;
  font-family: inherit;
  background-color: white;
  color: rgb(31 41 55);
  resize: vertical;
  transition: border-color 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

textarea::placeholder {
  color: rgb(156 163 175);
}

/* ==================== BUTTONS ==================== */

/* Base button styling - consistent with website */
#panel_customerOrders .button,
#panel_customerOrders a.button {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background-color: white;
  color: black;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid black;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  cursor: pointer;
  text-align: center;
}

#panel_customerOrders .button:hover,
#panel_customerOrders a.button:hover {
  background-color: black;
  color: white;
}

#panel_customerOrders .button:focus,
#panel_customerOrders a.button:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* Window/Modal buttons */
.button,
a.button {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background-color: white;
  color: black;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid black;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  cursor: pointer;
  text-align: center;
}

.button:hover,
a.button:hover {
  background-color: black;
  color: white;
}

.button:focus,
a.button:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* Modal/Window dialog styling */
.window .buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.window .description {
  text-align: center;
  color: rgb(55 65 81);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.window .body {
  padding: 1rem;
}

/* ==================== PANEL CUSTOMER ORDERS ==================== */

/* Wait/Loading State */
.script-panel_customerOrders_wait p {
  text-align: center;
  color: rgb(55 65 81);
}

.script-panel_customerOrders_wait div {
  text-align: center;
  margin-top: 1.5rem;
}

.script-panel_customerOrders_wait img {
  width: 2.5rem;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Order Container */
#panel_customerOrders .script-order {
  border: 1px solid rgb(156 163 175);
  border-radius: 0.5rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Order Header */
#panel_customerOrders .head {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  white-space: nowrap;
  background-color: rgb(243 244 246);
  border-bottom: 1px solid rgb(75 85 99);
  padding: 0.625rem;
  border-radius: 0.5rem 0.5rem 0 0;
}

#panel_customerOrders .head:hover {
  background-color: rgb(209 213 219);
}

#panel_customerOrders .button_toggleOrder {
  cursor: pointer;
}

/* Order Items */
#panel_customerOrders .script-orderItem {
  margin: 0.625rem;
  padding: 0.625rem;
  border: 1px solid rgb(75 85 99);
  border-radius: 0.25rem;
}

#panel_customerOrders img.script-thumbnail {
  border: 1px solid rgb(55 65 81);
  border-radius: 0.25rem;
}

/* Picture Details Padding on Desktop */
@media (min-width: 641px) {
  #panel_customerOrders .wpp-pictureDetails {
    padding-left: 1.25rem;
  }
}

/* Order Item File Name */
#panel_customerOrders .script-orderItem_originalFileName {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  white-space: nowrap;
  width: 100%;
}

#panel_customerOrders .script-orderItem_removedOriginalFileName {
  color: rgb(75 85 99);
  font-style: italic;
  text-decoration: line-through;
}

/* Order Item Status */
#panel_customerOrders .script-orderItem_status {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  white-space: nowrap;
}

#panel_customerOrders .script-orderItem_removedStatus {
  color: rgb(75 85 99);
  font-style: italic;
}

/* Order Item Prices */
#panel_customerOrders .script-orderItem_price {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  white-space: nowrap;
  text-align: right;
}

#panel_customerOrders .script-orderItem_removedPrice {
  color: rgb(75 85 99);
  font-style: italic;
  text-decoration: line-through;
}

#panel_customerOrders .script-orderItem_quote {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  white-space: nowrap;
  text-align: right;
}

#panel_customerOrders .script-orderItem_removedQuote {
  color: rgb(75 85 99);
  font-style: italic;
  text-decoration: line-through;
}

#panel_customerOrders .script-orderItem_deposit {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  white-space: nowrap;
  text-align: right;
}

#panel_customerOrders .script-orderItem_removedDeposit {
  color: rgb(75 85 99);
  font-style: italic;
  text-decoration: line-through;
}

/* Order Item Comment */
#panel_customerOrders .script-orderItem_originalComment {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgb(31 41 55);
  text-align: justify;
}

/* Boxes */
#panel_customerOrders .box {
  border: 1px solid rgb(75 85 99);
  border-radius: 0.25rem;
  padding: 0.375rem;
  margin-top: 0.625rem;
}

#panel_customerOrders .box_title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  margin-bottom: 0.375rem;
}

#panel_customerOrders .box_body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgb(31 41 55);
}

/* Questions and Answers */
#panel_customerOrders .script-box_question {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgb(31 41 55);
  margin-top: 0.625rem;
}

#panel_customerOrders .script-box_answer {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgb(75 85 99);
  margin-top: 0.625rem;
}

#panel_customerOrders .script-box_separator {
  background-color: rgb(107 114 128);
  margin-top: 0.375rem;
  margin-bottom: 0.375rem;
  height: 1px;
}

/* Buttons Section */
#panel_customerOrders .buttons {
  margin-top: 0.625rem;
  margin-bottom: 0.625rem;
}

#panel_customerOrders .foot_buttons {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  padding-left: 0.5rem;
  padding-right: 0;
}

/* Order Footer */
#panel_customerOrders .foot {
  padding-top: 1rem;
  padding-bottom: 0.375rem;
}

#panel_customerOrders .foot_price {
  padding-left: 0.375rem;
  padding-right: 0.625rem;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  white-space: nowrap;
}

/* Price Table Rows - Standard Prices */
#panel_customerOrders .script-order_basePrice,
#panel_customerOrders .script-order_additionalPhotoPriceTotal,
#panel_customerOrders .script-order_quote,
#panel_customerOrders .script-order_subtotal,
#panel_customerOrders .script-order_tax,
#panel_customerOrders .script-order_total,
#panel_customerOrders .script-order_remainingBalance {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  white-space: nowrap;
  text-align: right;
  padding-right: 0.625rem;
}

/* Price Table Rows - Discounts/Credits (Red) */
#panel_customerOrders .script-order_depositPhotoSession,
#panel_customerOrders .script-order_depositPhotoRetouching,
#panel_customerOrders .script-order_discount,
#panel_customerOrders .script-order_paymentReceived {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(185 28 28);
  white-space: nowrap;
  text-align: right;
  padding-right: 0.625rem;
}

/* Payment Due Now (Highlighted) */
#panel_customerOrders .script-order_paymentDueNow {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgb(31 41 55);
  white-space: nowrap;
  text-align: right;
  padding-right: 0.625rem;
  padding-top: 0.625rem;
}

/* Order Status Help Messages */
#panel_customerOrders .orderStatusHelp {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgb(31 41 55);
  padding-top: 0;
  padding-bottom: 0.25rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  text-align: left;
}

/* Feedback Section */
#panel_customerOrders .feedback {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: rgb(31 41 55);
  padding-top: 0;
  padding-bottom: 0.625rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  text-align: left;
}

/* Navigation */
#panel_customerOrders .navigation {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgb(31 41 55);
  white-space: nowrap;
  padding-top: 0.25rem;
  padding-bottom: 0.625rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Download Links */
#panel_customerOrders .link_download {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
}

#panel_customerOrders a.link_download {
  color: rgb(185 28 28);
  text-decoration: none;
}

#panel_customerOrders a.link_download:hover {
  color: rgb(127 29 29);
  text-decoration: underline;
}

/* Coupon Section */
#panel_customerOrders .coupon {
  font-family: system-ui, -apple-system, sans-serif;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.625rem;
}

#panel_customerOrders .command_applyOrderCoupon {
  margin-left: 0.25rem;
  margin-bottom: 0.25rem;
}

#panel_customerOrders .script-coupon_name {
  margin-right: 1.25rem;
}

/* Photo Session Summary */
#panel_customerOrders .photoSessionSummary {
  margin-top: 1rem;
  margin-bottom: 1rem;
  margin-left: 0.25rem;
}

#panel_customerOrders .noSessionPictureSelected {
  margin-top: 1rem;
  margin-bottom: 1rem;
  margin-left: 0.25rem;
}

/* Testimonial Window Permission Checkbox */
#window_testimonial .wpp-permission {
  line-height: 1;
  margin-top: 0.625rem;
  margin-bottom: 0.625rem;
}

/* ==================== MODAL WINDOWS ==================== */

#window_cancelOrderConfirmation,
#window_removePictureConfirmation,
#window_rejectPictureQuote,
#window_answerPictureQuestion,
#window_rejectPictureWork,
#window_resendPictureForRework,
#window_finalizeSessionPictureSelection {
  width: 24rem;
  max-width: 100%;
}

#window_testimonial {
  width: 37.5rem;
  max-width: 100%;
}

/* ==================== UTILITY CLASSES ==================== */

/* Align Right Utility */
.wpp-align-right {
  text-align: right;
}

/* Order Date */
.wpp-order_date {
  font-weight: 700;
  color: rgb(31 41 55);
}

/* Order Name */
.wpp-order_name {
  color: rgb(55 65 81);
}

/* Order Status */
.wpp-order_status {
  color: rgb(55 65 81);
  font-weight: 500;
}

/* Show/Hide for Different Screen Sizes */
.show-for-small-only {
  display: block;
}

@media (min-width: 768px) {
  .show-for-small-only {
    display: none;
  }
}

.show-for-medium {
  display: none;
}

@media (min-width: 768px) {
  .show-for-medium {
    display: block;
  }
}

/* Foundation Grid Compatibility (minimal for legacy JS) */
.row {
  display: block;
}

.row.collapse {
  display: block;
}

.columns {
  display: block;
}

@media (min-width: 768px) {
  .medium-3 {
    display: block;
    width: 25%;
  }
  
  .medium-5 {
    display: block;
    width: 41.666667%;
  }
  
  .medium-6 {
    display: block;
    width: 50%;
  }
  
  .medium-7 {
    display: block;
    width: 58.333333%;
  }
  
  .medium-9 {
    display: block;
    width: 75%;
  }
}

.small-6 {
  display: block;
  width: 50%;
}

.align-top {
  vertical-align: top;
}
