﻿@import '../Styles/styles.scss';

ShopPurchasePanel {
  position: relative;
  width: 100%;
  height: 100%;
  opacity: 0;
  align-items: flex-end;
  bottom: -130px;
  transition: all 0.4s;

  &.show {
    opacity: 1;
    bottom: 0;
  }
  
  .purchase-prompt {
    margin: 0 auto;
    width: 660px;
    height: 260px;
    flex-direction: column;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    bottom: 0;
    pointer-events: all;
    
    .cosmetic-title {
      font-family: $font-secondary;
      font-size: 44px;
      align-items: center;
      height: 72px;
      padding: 12px;
      color: white;
      width: 100%;
      border-left-width: 23px;
      background-image: linear-gradient(to right, black, rgba(0, 0, 0, 0.6));
    }
    
    .purchase-details {
      position: relative;
      align-items: center;
      justify-content: center;
      width: 100%;
      padding: 16px;
      
      .ape-coin {
        width: 64px;
        height: 64px;
      }

      .cost {
        color: #e1e1e1;
        font-family: $font-secondary;
        font-size: 32px;
      }
    }
    
    .buttons {
      width: 100%;
      justify-content: center;
      font-family: $font-secondary;
      padding-bottom: 24px;
      gap: 8px;
      margin-top: auto;
      
      .purchase {
        background-color: #619615;
        color: #e1e1e1;
        font-size: 32px;
        border-radius: 4px;
        padding: 12px 24px;
        pointer-events: all;
        justify-content: center;
        min-width: 200px;
        transition: background-color 0.3s ease;
        
        &.disabled {
          opacity: 0.6;
          color: #cccccc;
        }

        &:hover:not(.disabled) {
          background-color: darken(#619615, 20%);
        }

        &:active {
          transform: translateY(1px); 
        }
      }
      
      .cancel {
        color: #f8f9fa;
        padding: 12px 24px;
        font-size: 32px;
        border-radius: 4px;
        pointer-events: all;
        transition: background-color 0.3s ease, color 0.3s ease;

        &:hover {
          background-color: rgba(255, 255, 255, 0.02);
          color: #f8f9fa;
        }

        &:active {
          transform: translateY(1px);
        }
      }
    }
  }
}

.spinner {
  width: 32px;
  height: 32px;
  border: 5px solid rgba(255, 255, 255, 1);
  border-top: 5px solid lightgrey;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}