/* Style systemu rabatów */

/* Główny kontener rabatów */
.discout-panel h4,
.add-rabat-section h4{
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 1.7rem;
  margin-bottom: 1rem;
}
.rabaty-box {
    background: linear-gradient(135deg, #f8f5ff 0%, #f3f0ff 100%);
    border: 2px solid var(--theme-purple);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(113, 47, 170, 0.1);
    margin: 25px 0;
    overflow: hidden;
    position: relative;
}

@keyframes shimmer {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.rabaty-box h4 {
    background: var(--theme-purple);
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rabaty-box h4 i {
    font-size: 20px;
}

.rabaty-content {
    padding: 20px;
}

/* Pojedynczy rabat */
.rabat-item {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8e0ff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rabat-item:last-child {
    margin-bottom: 0;
}

.rabat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(113, 47, 170, 0.15);
    border-color: var(--theme-purple);
}

.rabat-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--theme-yellow)
}

/* Badge z wartością rabatu */
.rabat-badge {
    background: var(--theme-yellow);
    color: white;
    padding: 12px 16px;
    border-radius: 50px;
    margin-right: 15px;
    box-shadow: 0 3px 15px rgba(113, 47, 170, 0.3);
    min-width: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rabat-badge::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: sweep 3s ease-in-out infinite;
}

@keyframes sweep {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.rabat-value {
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

/* Szczegóły rabatu */
.rabat-details {
    flex: 1;
}

.rabat-description {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.rabat-expiry {
    color: #666;
    font-size: 13px;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    display: inline-block;
}

/* Responsywność */
@media (max-width: 768px) {
    .rabat-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .rabat-badge {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .rabaty-content {
        padding: 15px;
    }

    .rabaty-box h4 {
        padding: 12px 15px;
        font-size: 16px;
    }
}

/* Stile formularza w panelu użytkownika */
.rabat-form .form-group {
    margin-bottom: 20px;
}

.rabat-form label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.rabat-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.rabat-form .form-control:focus {
    border-color: var(--theme-purple);
    box-shadow: 0 0 0 3px rgba(113, 47, 170, 0.1);
    outline: none;
}

.rabat-form .btn-primary {
    background: linear-gradient(135deg, var(--theme-purple) 0%, var(--theme-yellow) 100%);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Alert info box */
.rabaty-info .alert-info {
    background: linear-gradient(135deg, #f8f5ff 0%, #e8e0ff 100%);
    border: 1px solid var(--theme-purple);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.rabaty-info .alert-info h4 {
    color: var(--theme-purple);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rabaty-info .alert-info ul {
    margin: 0;
    padding-left: 20px;
}

.rabaty-info .alert-info li {
    margin-bottom: 8px;
    color: #424242;
}

.btn-sm.btn-danger {
    background: #dc3545;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-sm.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Ikona rabatu w kartach firm (opcjonalnie) */
.card .rabat-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--theme-purple);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(113, 47, 170, 0.3);
}

/* Efekt pulsowania dla nowych rabatów */
@keyframes pulse-rabat {
    0% { box-shadow: 0 0 0 0 rgba(113, 47, 170, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(113, 47, 170, 0); }
    100% { box-shadow: 0 0 0 0 rgba(113, 47, 170, 0); }
}

.rabat-badge.new {
    animation: pulse-rabat 2s infinite;
}