/* Sekcja kuponu w formularzu rejestracji */
.coupon-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.coupon-toggle {
    margin-bottom: 15px;
}

.coupon-toggle-btn {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 16px;
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
}

.coupon-toggle-btn:hover {
    color: black;
    text-decoration: underline;
    background: none;
}

.toggle-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: 10px;
}

.coupon-toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

.coupon-form {
    animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        overflow: hidden;
    }
    to {
        opacity: 1;
        max-height: 200px;
        overflow: visible;
    }
}

.coupon-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#coupon_code {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#coupon_code:focus {
    outline: none;
    border-color: #C57C13;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.apply-coupon-btn,
.remove-coupon-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.apply-coupon-btn {
    background: #C57C13;
    color: white;
    border-radius: 12px;
}

.apply-coupon-btn:hover {
    background: #C57C13;
}

.apply-coupon-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.remove-coupon-btn {
    background: #dc3545;
    color: white;
}

.remove-coupon-btn:hover {
    background: #c82333;
}

.coupon-messages {
    margin-bottom: 10px;
}

.coupon-success,
.coupon-error,
.coupon-info {
    padding: 10px 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.coupon-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.coupon-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.coupon-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.applied-coupon {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 12px;
    margin-top: 10px;
}

.coupon-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.coupon-label {
    font-weight: 600;
    color: #155724;
}

.coupon-code-display {
    background: #155724;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    font-weight: bold;
}

.coupon-savings {
    color: #155724;
    font-weight: 600;
    font-size: 14px;
}

/* Aktualizacja cen w podsumowaniu */
.package-details {
    position: relative;
}

.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9em;
    margin-right: 10px;
}

.discounted-price {
    color: #28a745;
    font-weight: bold;
    font-size: 1.1em;
}

.price-breakdown {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.price-line.total {
    border-top: 1px solid #dee2e6;
    padding-top: 8px;
    margin-top: 8px;
    font-weight: bold;
    font-size: 16px;
}

.price-line.discount {
    color: #28a745;
}

/* Loading state */
.coupon-loading {
    display: none;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
}

.coupon-loading.show {
    display: flex;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .coupon-input-group {
        flex-direction: column;
    }
    
    #coupon_code {
        min-width: auto;
        width: 100%;
    }
    
    .apply-coupon-btn,
    .remove-coupon-btn {
        width: 100%;
    }
    
    .coupon-details {
        flex-direction: column;
        align-items: flex-start;
    }
} 