/* Poprawki dla modalu ekwipunku */

/* Modal do używania przedmiotów - teraz poza kontenerem inventory */
.pro-modal-overlay {
    position: fixed !important; /* Wymuszenie fixed */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99999 !important; /* Bardzo wysoki z-index */
    display: none;
    justify-content: center;
    align-items: center;
}

.pro-modal-overlay.active {
    display: flex !important;
}

/* Ważne: modal jest poza pro-inventory-container, więc musimy usunąć to odniesienie */
#pro-use-modal-overlay .pro-modal {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: proModalFadeIn 0.3s ease forwards;
}

/* Zapewnienie, że modal jest zawsze widoczny na różnych urządzeniach */
@media (max-height: 800px) {
    #pro-use-modal-overlay  .pro-modal {
        max-height: 80vh;
    }
}

@media (max-height: 600px) {
    #pro-use-modal-overlay  .pro-modal {
        max-height: 95vh; /* Na małych ekranach pozwól aby zajmował więcej miejsca */
    }
}

@keyframes proModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#pro-use-modal-overlay  .pro-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background-color: #fff;
    border-radius: 8px 8px 0 0;
    z-index: 2;
}

#pro-use-modal-overlay  .pro-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pro-modal-header .item-rarity-badge {
    position: static;
    margin-left: 10px;
}

#pro-use-modal-overlay  .pro-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #666;
    width: 30px;
    height: 30px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#pro-use-modal-overlay  .pro-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

#pro-use-modal-overlay  .pro-modal-body {
    padding: 20px;
}

#pro-use-modal-overlay  .pro-modal-section {
    margin-bottom: 20px;
}

#pro-use-modal-overlay  .pro-modal-section:last-child {
    margin-bottom: 0;
}

#pro-use-modal-overlay  .item-image-large {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#pro-use-modal-overlay  .item-image-large img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 8px;
    background-color: #fafafa;
}

#pro-use-modal-overlay  .item-details-list {
    margin-bottom: 20px;
}

#pro-use-modal-overlay  .item-detail-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

#pro-use-modal-overlay  .item-detail-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

#pro-use-modal-overlay  .item-detail-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

#pro-use-modal-overlay .item-detail-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

#pro-use-modal-overlay .item-description-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

.item-description-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.item-description {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.item-effects-section {
    background-color: #f0f7ff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #d1e4ff;
}

.item-effects-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0073aa;
    font-size: 16px;
}

.item-effects {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-effect {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.effect-icon {
    margin-right: 8px;
    color: #0073aa;
}

.effect-label {
    font-weight: 500;
    margin-right: 5px;
    color: #444;
}

.effect-value {
    color: #666;
}

.item-action-section {
    text-align: center;
    margin-top: 20px;
}

.item-use-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.item-use-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.item-use-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.item-use-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pro-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.item-cancel-button {
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.item-cancel-button:hover {
    background-color: #e9ecef;
    color: #333;
}

.item-use-result {
    text-align: center;
    padding: 20px;
    display: none;
}

.item-use-success {
    color: #28a745;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

.use-success-animation {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 15px;
    animation: successPulse 1s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Style dla efektów użycia przedmiotu */
.use-effect {
    display: flex;
    align-items: center;
    font-size: 15px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.use-effect:last-child {
    margin-bottom: 0;
}

.use-effect .dashicons {
    margin-right: 10px;
    font-size: 18px;
}

.use-effect.health {
    background-color: #ffefef;
    color: #e53935;
}

.use-effect.health .dashicons {
    color: #e53935;
}

.use-effect.energy {
    background-color: #e6f7ff;
    color: #0288d1;
}

.use-effect.energy .dashicons {
    color: #0288d1;
}

.use-effect.equip {
    background-color: #edf7ed;
    color: #2e7d32;
}

.use-effect.equip .dashicons {
    color: #2e7d32;
}

/* Responsive adjustments */
@media screen and (max-width: 576px) {
    .item-detail-row {
        flex-direction: column;
        gap: 10px;
    }

    .pro-modal-header h3 {
        font-size: 16px;
    }
}
/* Dodatkowe style CSS dla przycisku sprzedaży 
   Dodaj poniższe style na koniec pliku inventory-use-modal.css */

.item-sell-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.item-sell-button:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.item-sell-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.item-sell-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.use-effect.sell {
    background-color: #fff8e1;
    color: #ff8f00;
}

.use-effect.sell .dashicons {
    color: #ff8f00;
}

.balance-updated {
    animation: balancePulse 1s ease-in-out;
    font-weight: bold;
}

@keyframes balancePulse {
    0% {
        color: inherit;
    }
    50% {
        color: #ff8f00;
    }
    100% {
        color: inherit;
    }
}

/* Style dla sekcji wyboru ilości przedmiotów do sprzedaży - do dodania w inventory-use-modal.css */

.item-quantity-selection {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
}

.quantity-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  color: #333;
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.quantity-decrease,
.quantity-increase {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  color: #495057;
  font-weight: bold;
  font-size: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.quantity-decrease:hover,
.quantity-increase:hover {
  background-color: #dee2e6;
}

.quantity-decrease {
  border-radius: 4px 0 0 4px;
}

.quantity-increase {
  border-radius: 0 4px 4px 0;
}

.quantity-input {
  width: 60px;
  height: 36px;
  text-align: center;
  border: 1px solid #ced4da;
  border-left: none;
  border-right: none;
  font-size: 14px;
  padding: 0 5px;
  -moz-appearance: textfield; /* Firefox */
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-total {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
}

.total-label {
  margin-right: 5px;
  color: #666;
}

.total-value {
  font-weight: 600;
  color: #dc3545;
}