/* Place Order specific styles */
.place-order-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 64px auto 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.add-design-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-design-button:hover {
    background-color: #111827;
}

/* Table styles */
.order-table {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

td {
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.preview-box {
    width: 60px;
    height: 60px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-box .design-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Total quantity styles */
.total-label,
.total-value {
    font-weight: 600;
}

/* Size range styles */
.size-ranges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.size-range-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.size-range-select {
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-background);
}

.quantity-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    color: var(--color-text);
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    opacity: 1;
}

.add-size-range,
.remove-size-range,
.remove-design {
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-size-range:hover,
.remove-size-range:hover,
.remove-design:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

/* Modal styles */
.design-select-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Prevent scrolling on the background */
}

.design-select-modal.active {
    display: flex;
}

.design-modal-content {
    background: var(--color-background);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    /* Limit the height to 90% of the viewport height */
    margin: 2rem;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.close-modal {
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background-color 0.2s;
}

.close-modal:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.modal-body {
    flex-grow: 1;
    overflow-y: auto;
    /* Enable vertical scrolling */
    padding: 1rem;
}

.design-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.design-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.design-item:hover {
    background: var(--color-surface);
}

.design-item .design-preview {
    width: 80px;
    height: 80px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    align-items: stretch;
}

.design-item .design-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-info {
    flex: 1;
}

.design-info h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    margin: 0 0 0.5rem;
}

.design-info p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.select-button {
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select-button:hover {
    background-color: #111827;
}

/* Contact details styles */
.contact-details {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;

}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    color: var(--color-text);
    background: var(--color-background);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group input.error {
    border-color: #ef4444;
}

/* Ensure club name doesn't show error outline */
/* Removed empty rule */

/* Form actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
}

.place-order-button {
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.place-order-button:hover {
    background-color: #111827;
}

/* Responsive styles */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .size-range-group {
        flex-wrap: wrap;
    }

    .size-range-select,
    .quantity-input {
        flex: 1;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.edit-address-button {
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.edit-address-button:hover {
    background: var(--color-surface);
    color: var(--color-text);
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Product type cell styling */
.product-type-cell {
    text-transform: capitalize;
}

/* Silicon grip column - always visible for alignment, but checkbox hidden for jerseys */
.silicon-grip {
    text-align: left;
}

.silicon-grip-placeholder {
    display: inline-block;
    width: 20px; /* Match checkbox width for alignment */
    height: 20px;
}

.silicon-grip-checkbox {
    cursor: pointer;
}


