@charset "UTF-8";
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: #fafafa;
  font-size: 0.8rem;
}

img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.container {
  background: white;
  border-radius: 24px;
  padding: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  view-transition-name: container;
  width: 350px;
  max-width: calc(100% - 2rem);
  height: 70%;
  margin: 0 auto 5rem;
}

.list-header {
      font-size: 0.8rem;
  font-weight: 500;
  color: #18181b;
  margin-bottom: 24px;
  padding-left: 12px;
  view-transition-name: list-header;
  height: fit-content;
  overflow: hidden;
}

.not-expanded {
  view-transition-class: not-expanded;
}

.not-expanded * {
  view-transition-class: not-expanded;
}

.container:has(.not-expanded) :is(.list-header, .all-transactions) {
  view-transition-class: not-expanded;
}

.container:has(.expanded) .list-header {
  display: none;
}

.container:has(.expanded) .all-transactions {
  display: none;
}

.container:has(.expanded) .transaction:not(.expanded) {
  display: none;
}

.transaction-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  view-transition-name: transaction-list;
}

.transaction {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 16px;
  cursor: pointer;
}

.transaction.expanded {
  flex-direction: column;
  align-items: flex-start;
  background: #ffffff;
}

.transaction.expanded .transaction-details, 
.transaction.expanded .payment-details {
  display: flex;
}

.transaction.expanded .icon-container {
  width: 100%;
}

.transaction.expanded .icon-container .close-btn {
  display: flex;
}

.title-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.icon-container {
  display: flex;
  justify-content: space-between;
}

.icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.icon1{
	  background: #1e9a91
}
.icon2{
	  background: #db251d
}

.icon3{
	  background: #383f7d;
}

.icon4{
	  background: #e77f14;
}
.icon5{
	  background: #d83284;
}

.icon6{
	  background: #0b83c3;
}


.icon svg {
  width: 20px;
  height: 20px;
  color: white;
}

.details {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex: 1;
  width: 100%;
}

.title {
  font-weight: 500;
  color: #18181b;
  margin-bottom: 4px;
}

.transaction-details, 
.payment-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #71717a;
  border-top: 1px dotted #71717a;
  padding-top: 6px;
  width: 100%;
  display: none;
}

.transaction-details {
  view-transition-class: transaction-details;
}

.payment-details {
  view-transition-class: payment-details;
}

.all-transactions {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #18181b;
  font-weight: 500;
  margin-top: 8px;
  cursor: pointer;
  view-transition-name: all-transactions;
}

.all-transactions a {
  color: inherit;
  text-decoration: none;
}

.close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f4f4f5;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

@keyframes slide-up {
  from {
    opacity: 0;
    margin-top: 30px;
  }
  to {
    opacity: 1;
    margin-top: 0;
  }
}

@keyframes fade-out {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

::view-transition-group(*) {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1);
}

::view-transition-old(*),
::view-transition-new(*) {
  height: 100%;
}

html:active-view-transition-type(expand)::view-transition-group(.transaction-details),
html:active-view-transition-type(expand)::view-transition-group(.payment-details) {
  animation-name: slide-up;
  animation-duration: 0.5s;
}

html:active-view-transition-type(collapse)::view-transition-group(.transaction-details),
html:active-view-transition-type(collapse)::view-transition-group(.payment-details) {
  animation-name: fade-out;
}

::view-transition-group(.not-expanded) {
  animation-name: fade-out;
}


/*--------------main-------------------*/
h1{
  font-family: "Shippori Mincho", serif;
  font-weight: bold;
  font-style: normal;
	text-align: center;
font-size: 1.3rem;
	margin-bottom: 2rems
}
h2{
	font-size: 1rem;
}

.payment-method{
	display: flex;
	gap:0.5rem;
	align-items: flex-start
}

.transaction-id{
	display: flex;
	gap:0.5rem;
	align-items: flex-start;
}
.transaction-date{
	text-align: justify;
}

.top{
 display: flex;
  align-items: flex-start;
	  object-fit: contain;
	position: left top;
}
.img{
	width: 50%;
	height: auto;
}
.text{
	width: 50%;
	border: 1px solid #ccc;
	border-radius: 10px;
	padding: 0.5rem
}
.img img{
	border: #ccc 2px solid;
	box-shadow: 3px 3px 0px 0px #ccc
}
.btn{
	text-align: center;
	margin-top: 1rem
}

.btn a{
	text-decoration: none;
	padding: 0 0.3rem;
	white-space: nowrap;
	color: #000;
	margin-top: 0.5rem;
	line-height: 2rem;
	border-radius: 5px;
	display: block;
	background-color: #1e9a91;
	opacity: 0.6;
	transition:  all 0.5s;
	transform: translateY(0);
	color: #fff;
}
.btn a:hover{
opacity: 1;
transform: translateY(-5px);
}

/*--------------デスクトップ用------------*/
@media(min-width:550px) {
	body{
		font-size: 1rem;
	}
	.list-header {
      font-size: 1srem;
	}
	h1{
		font-size: 2rem;
		text-align: left
	}
	h2{
		font-size: 1.5rem;
	}
	main{
		display: flex;
		width: 90%;
		max-width:1500px ;
		margin: auto;
		gap:2rem;
		justify-content: center;
		align-items: flex-start;
		padding: 2rem
	}
	.container{
		width: 1000px;
		max-width: 100%;
		margin: 1rem auto;
	}
	.top{
		margin-top: 2rem;
		height: 90vh;
		width: auto
	}
}