.design-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 22px;
}

.design-card {
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 6px 20px rgba(0,0,0,.08);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	position: relative;
}

.design-card-thumb {
	height: 150px;
	background: #f3f3f3;
}

.design-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.design-card-body {
	padding: 5px;
}

.design-title {
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: text;
}

.title-edit-icon {
	font-size: 12px;
	color: #999;
	opacity: 0;
	transition: opacity .15s ease;
}

.design-title:hover .title-edit-icon {
	opacity: 1;
}

.design-title:hover {
	text-decoration: underline;
}

.design-date {
	font-size: 12px;
	color: #777;
}

.design-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 5px 14px 5px;
}

.design-badge {
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.design-badge.ready {
	background: #e6f7ee;
	color: #1f9254;
}

.design-badge.draft {
	background: #fff3cd;
	color: #856404;
}

.design-menu-btn {
	background: none;
	border: none;
	font-size: 18px;
	cursor: pointer;
	color: #666;
}

.design-card-actions {
	display: flex;
	gap: 10px;
}

.design-action {
	background: none;
	border: none;
	cursor: pointer;
	color: #777;
	padding: 4px;
}

.design-action svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.design-action:hover {
	background: none;
	color: #c0392b;
}

.design-action.delete:hover {
	background: none;
	color: #c0392b;
}

.design-title-input {
	width: 100%;
	font-size: 15px;
	font-weight: 600;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 4px 6px;
}

.sampleSvgIcon {
    width: 32px;
    height: 32px;
    cursor: pointer;
	margin: 3px;
}

.sampleSvgIcon:hover {
    opacity: 0.8;
}

/*highlight card*/
.design-highlight {
    position: relative;
    z-index: 10;
    box-shadow: 0 0 0 4px rgba(0, 150, 255, 0.6);
    border-radius: 8px;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0%   { box-shadow: 0 0 0 4px rgba(0,150,255,.6); }
    50%  { box-shadow: 0 0 0 8px rgba(0,150,255,.3); }
    100% { box-shadow: 0 0 0 4px rgba(0,150,255,.6); }
}

.design-arrow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    animation: bounce 1s infinite;
    pointer-events: none;
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -10px); }
}

.design-new-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 70px;
    height: 70px;
    z-index: 20;
    pointer-events: none;
    animation: popIn 0.4s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}



/* ===============================
   HARD RESET (ASTRA SAFE)
   =============================== 
#design-order-modal label,
#design-order-modal input,
#design-order-modal button,
#design-order-modal p,
#design-order-modal h2,
#design-order-modal h3 {
	all: unset;
	box-sizing: border-box;
}
*/
#design-order-modal,
#design-order-modal * {
	box-sizing: border-box;
	font-family: Inter, system-ui, sans-serif;
}

#design-order-modal.dom-hidden {
	display: none;
}

/*Modal confirm dialog*/
.ev-modal {
  position: fixed;       /* Fixes it relative to the viewport */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;         /* Hidden by default */
  align-items: center;   /* Center vertically */
  justify-content: center; /* Center horizontally */
  background: rgba(0,0,0,0.5); /* Semi-transparent background */
  z-index: 99999;         /* High value to be on top */
}

.ev-modal-content {
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ev-modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

.ev-modal-buttons button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

#ev-cancel-btn {
    background-color: #ccc;
    color: #333;
}

#ev-confirm-btn {
    background-color: #ff4d4d;
    color: #fff;
}

#ev-confirm-btn:hover {
    background-color: #e64545;
}

#ev-cancel-btn:hover {
    background-color: #bbb;
}

/* ===============================
   BACKDROP + ROOT
   =============================== */

#design-order-modal {
	position: fixed;
	inset: 0;
	z-index: 9998;
}

.dom-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.45);
}

.dom-root {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ===============================
   CONTAINER
   =============================== */

.dom-container {
	width: 100%;
	height: 80vh;
	max-height: 80vh;
	max-width: 900px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0,0,0,.25);
	display: flex;
	flex-direction: column;
}

/* ===============================
   HEADER
   =============================== */

.dom-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.dom-header h2 {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
}

.dom-close {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
}

/* ===============================
   BODY LAYOUT
   =============================== */

.dom-body {
	flex: 1 1 auto;
	overflow-y: auto;
	min-height: 0; 
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 24px;
	padding: 24px;
}

.dom-body,
.dom-config,
.dom-order-types {
	min-height: 0;
	min-width: 0;
}


/* ===============================
   ORDER TYPES (LEFT)
   =============================== */

.dom-order-types {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.order-type {
	display: flex;
	gap: 12px;
	padding: 14px;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	cursor: pointer;
	background: #fff;
}

.order-type strong {
	font-size: 14px;
	display: block;
}

.order-type p {
	font-size: 12px;
	color: #666;
	margin: 4px 0 0;
}

.order-type .radio {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid #bbb;
	margin-top: 4px;
}

.order-type.active {
	border-color: #4f6df5;
	background: #f3f6ff;
	box-shadow: inset 4px 0 0 #4f6df5;
}

.order-type.active .radio {
	background: #4f6df5;
	border-color: #4f6df5;
	box-shadow: inset 0 0 0 3px #fff;
}

/* ===============================
   RIGHT PANEL
   =============================== */

.dom-config {
	min-height: 200px;
	max-width: 100%;
	overflow: hidden;
}

.dom-panel {
	display: none;
}

.dom-panel.active {
	display: block;
}

.dom-panel h3 {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 12px;
}

/* ===============================
   BULK SIZES
   =============================== */

/* === SIZE ROW === */
.size-row {
	display: flex;
	align-items: center;
	justify-content: center;        

	gap: 14px;
	padding: 12px 16px;
	margin-bottom: 12px;

	background: #f9fafb;
	border: 1px solid #e6e8ec;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.size-label {
	min-width: 36px;
	height: 36px;

	display: flex;
	align-items: center;
	justify-content: center;

	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;

	color: #1f2937;
	background: #f9fafb;

	border: 1px solid #e5e7eb;
	border-radius: 8px;
}


/* === QUANTITY VALUE === */
.qty-value {
	min-width: 20px;
	text-align: center;

	font-size: 14px;
	font-weight: 600;
	color: #111827;
}

.qty-plus,
.qty-minus {
	/* restore after all: unset */
	all: unset;

	box-sizing: border-box;

	width: 34px;
	height: 34px;

	display: flex;
	align-items: center;
	justify-content: center;

	background-color: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 50%;

	font-size: 18px;
	font-weight: 500;
	line-height: 1;
	color: #111827;

	cursor: pointer;
	user-select: none;

	transition:
		background-color 0.15s ease,
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}


.qty-plus:hover,
.qty-minus:hover {
	background-color: #f3f4f6;
	border-color: #9ca3af;
}

.qty-plus:active,
.qty-minus:active {
	background-color: #e5e7eb;
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.qty-minus[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
}




/* ===============================
   TEAM TABLE
   =============================== */
.team-table-wrapper {
	max-width: 100%;
	overflow-x: auto;     
	max-height: 400px;   	
	
}

.team-table thead th {
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 1;
}

.team-actions {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
}

.team-actions button {
	background: #f1f1f1;
	border-radius: 8px;
	padding: 6px 12px;
	cursor: pointer;
}

.team-table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
	table-layout: fixed;   
}

th.colNum {
    width: 15% !important;
}

input.numberCol {
    text-align: center;
}

th.colSize {
    width: 15% !important;
}

th.colAction {
    width: 8% !important;
}

button#upload-team-file {
	color: green;
}

button.removeRow{	
	padding: 3px !important;
	background: none;
}

.trashBtn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.trashIcon {
    width: 18px;
    height: 18px;
    transition: 0.2s;
}

.trashIcon:hover {
	color: #cc0000;
}

.team-table th,
.team-table td {
	padding: 8px;
	border: 1px solid #e5e7eb;
	vertical-align: middle;
	font-size: small;
}

select.sizeSelect {
	text-align: center;
}

.team-table th:nth-child(1),
.team-table td:nth-child(1) {
	width: 40%;   /* Name */
}

.team-table th:nth-child(2),
.team-table td:nth-child(2) {
	width: 25%;   /* Number */
}

.team-table th:nth-child(3),
.team-table td:nth-child(3) {
	width: 25%;   /* Size */
}

.team-table th:nth-child(4),
.team-table td:nth-child(4) {
	width: 10%;   /* Remove */
}

.team-table input,
.team-table select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.team-table-actions {
	margin-top: 12px;
	text-align: left;
}

.add-team-row {
	background: #f9fafb;
	border: 1px dashed #c7cdd6;
	border-radius: 8px;

	padding: 8px 14px;
	font-size: 14px;
	font-weight: 500;
	color: #374151;

	cursor: pointer;
}

.add-team-row:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
}



/* ===============================
   FOOTER
   =============================== */

.dom-footer {
	padding: 16px 24px;
	border-top: 1px solid #eee;
	display: flex;
	justify-content: flex-end;
}

.add-to-cart {
	background: #e00000;
	color: #fff;
	border-radius: 10px;
	padding: 10px 18px;
	cursor: pointer;
}

.add-to-cart[disabled] {
	background: #e5e7eb;      /* light gray */
	color: #9ca3af;           /* muted text */
	border-color: #e5e7eb;

	cursor: not-allowed;
	box-shadow: none;
	opacity: 1;               /* prevent Astra opacity weirdness */
}

/*Player names button*/
.ev-players-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;

  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;

  /* THIS is what makes it modal */
  display: flex;
  align-items: center;
  justify-content: center;
}


#ev-players-modal.ev-players-modal.ev-players-modal--open {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}


.ev-players-modal__backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.45) !important;
}

.ev-players-modal__box {
  position: relative;
  z-index: 1;

  max-width: 420px;
  width: calc(100% - 32px);
  max-height: 70vh;

  background: #fff;
  padding: 16px;
  border-radius: 6px;
  overflow: auto;
}

.ev-players-modal__list {
  padding-left: 18px;
  margin: 12px 0;
}

.ev-players-modal__close {
  margin-top: 12px;
}



/* ===============================
   MOBILE
 =============================== */
  
@media (max-width: 768px) {

	.dom-body {
		display: block !important;
	}

	button#upload-team-file {
		display: none;
	}
	
	span#download-templates{
		display: none;
	}
	

	.dom-order-types,
	.dom-config {
		position: static !important;
		inset: auto !important;
		transform: none !important;
		float: none !important;

		width: 100% !important;
		max-width: 100% !important;

		display: block !important;
	}

	.dom-order-types {
		margin-bottom: 12px;
	}

	.dom-order-types,
	.dom-config,
	.dom-panel {
		min-width: 0 !important;
		min-height: 0 !important;
	}

	.team-table-actions {
		position: sticky;
		bottom: 0;

		background: #ffffff;
		padding: 3px 0;
		margin: 3px;

		z-index: 2;
	}	
	
	table#team-table {
		margin-bottom: 3px;
}
	
}



.order-type {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	cursor: pointer;
	background: #fff;
}

.order-type strong {
	font-size: 14px;
	font-weight: 600;
}

.order-type p {
	font-size: 12px;
	color: #666;
}

.order-type.active {
	border-color: #4f6df5;
	background: #f3f6ff;
	box-shadow: inset 4px 0 0 #4f6df5;
}
#design-order-modal {
	font-family: Inter, system-ui, sans-serif;
}

#design-order-modal *,
#design-order-modal *::before,
#design-order-modal *::after {
	box-sizing: border-box;
}




